diff options
| author | bbangert <devnull@localhost> | 2006-03-19 22:09:05 +0000 |
|---|---|---|
| committer | bbangert <devnull@localhost> | 2006-03-19 22:09:05 +0000 |
| commit | 4be0f5b7f0d5abcdcaef32ff5f5a0416129fe954 (patch) | |
| tree | fa3e89134ff3f7ec6024902ffc4a9e12afde37b9 /paste | |
| parent | 760447a0d807a5de70fac0eeef2a3bc2e58b0b0a (diff) | |
| download | paste-4be0f5b7f0d5abcdcaef32ff5f5a0416129fe954.tar.gz | |
Removed LazyCache, cause it didn't work, and should use environ to cache the values anyways
Diffstat (limited to 'paste')
| -rw-r--r-- | paste/wsgiwrappers.py | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/paste/wsgiwrappers.py b/paste/wsgiwrappers.py index a76af17..981b7a6 100644 --- a/paste/wsgiwrappers.py +++ b/paste/wsgiwrappers.py @@ -31,27 +31,6 @@ class environ_getter(object): def __repr__(self): return '<Proxy for WSGI environ %r key>' % self.key -class LazyCache(object): - """Lazy and Caching Function Executer - - LazyCache takes a function, and will hold onto it to be called at a - later time. When the function is called, its result will be cached and - used when called in the future. - - This style is ideal for functions that may require processing that is - only done in rare cases, but when it is done, caching the results is - desired. - - """ - def __init__(self, func): - self.fn = func - self.result = None - - def __call__(self, *args): - if not self.result: - self.result = self.fn(*args) - return self.result - class WSGIRequest(object): """WSGI Request API Object @@ -106,7 +85,7 @@ class WSGIRequest(object): formvars = MultiDict() formvars.update(parse_formvars(self.environ, all_as_list=True, include_get_vars=False)) return formvars - POST = property(LazyCache(POST), doc=POST.__doc__) + POST = property(POST, doc=POST.__doc__) def params(self): """MultiDict of keys from POST, GET, URL dicts |
