Disable cache support of LazyProxy.
Since Babel 1.0, there's a enable_cache keyword argument of LazyProxy, but we can't pass it directly.
This commit is contained in:
parent
874439bd80
commit
15c3461b1f
@ -53,9 +53,9 @@ class ReallyLazyProxy(LazyProxy):
|
||||
"""
|
||||
Like LazyProxy, except that it doesn't cache the value ;)
|
||||
"""
|
||||
@property
|
||||
def value(self):
|
||||
return self._func(*self._args, **self._kwargs)
|
||||
def __init__(self, func, *args, **kwargs):
|
||||
super(ReallyLazyProxy, self).__init__(func, *args, **kwargs)
|
||||
object.__setattr__(self, '_is_cache_enabled', False)
|
||||
|
||||
def __repr__(self):
|
||||
return "<%s for %s(%r, %r)>" % (
|
||||
|
Loading…
x
Reference in New Issue
Block a user