Simple response cache for FlickrAPI calls.
This stores max 50 entries, timing them out after 120 seconds:
>>> cache = SimpleCache(timeout=120, max_entries=50)
|
|
__init__(self,
timeout=300,
max_entries=200)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
locking(method)
Method decorator, ensures the method call is locked |
source code
|
|
|
|
get(self,
*args,
**kwargs)
Fetch a given key from the cache. |
source code
|
|
|
|
|
|
|
delete(self,
*args,
**kwargs)
Deletes a key from the cache, failing silently if it doesn't exist. |
source code
|
|
|
|
has_key(self,
*args,
**kwargs)
Returns True if the key is in the cache and has not expired. |
source code
|
|
|
|
|
|
|
|
|
|
__len__(self,
*args,
**kwargs)
Returns the number of cached items -- they might be expired
though. |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|