Store¶
-
class
methodcache.store.
Store
(ttl=60)[source]¶
-
class
methodcache.store.
MethodStore
(store, *args, **kwargs)[source]¶ -
create
(func, params, result)[source]¶ Create a new Cache Entry
Parameters: - func – WrappedFunction for wich function the entry created
- params – WrappedParameter which parameters used to get this result
- result – string Result
-
get_method
(func, params)[source]¶ Returns the MethodObject identified by func and params
Parameters: - func – WrappedFunction Object to identifiy search method
- params – WrappedParameters Object to check if a object with this parameters is stored
Return MethodObject: the MethodObject with the cache Information
-
has_method
(func)[source]¶ Check if function is stored in this MethodStore Object
Parameters: func – WrapperFunction with the searched funciton Return bool: True if method existes in this store
-
has_method_call
(func, params)[source]¶ Like has_method. This Checks also if a method with the given arguments exists
Parameters: - func – WrapperFunction contains the function
- params – WrapperParameters contains arguments and keyword arguments
Return bool: True if method call exists and stored in this MEthodStore
-