Cache

methodcache.cache.cache(**options)[source]

Decorator method for caching

Parameters:
  • ttl – Time to life for this Cache Entry in Seconds
  • store – Storage Object. To this object the cache entry was saved
  • category – String in which Category the cache object should be sorted
methodcache.cache.add_to_cache(options={}, func=None, params=None)[source]

Seperated Add To Cache Method; Contains the function stack to add a function and there result to cache

Parameters:
  • options – dict with keys of store,category,ttl (previously validated)
  • func – orginal function
  • params – WrapperParameters object with *args and **kwargs from orginal function
Return any:

Result created by orignal function