forked from github/pelican
Allow resetting memoized cache. Fixes #3110.
This commit is contained in:
parent
86f62d0a92
commit
7adcfc7938
2 changed files with 34 additions and 1 deletions
|
|
@ -155,7 +155,9 @@ class memoized:
|
|||
|
||||
def __get__(self, obj, objtype):
|
||||
'''Support instance methods.'''
|
||||
return partial(self.__call__, obj)
|
||||
fn = partial(self.__call__, obj)
|
||||
fn.cache = self.cache
|
||||
return fn
|
||||
|
||||
|
||||
def deprecated_attribute(old, new, since=None, remove=None, doc=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue