cache¶
cache
is an instance of apicore.cache.Cache
-
class
apicore.cache.
Cache
¶ Cache for the application. To use by importing the instance :
- exemple:
from apicore import cache key = "my_data" date = {"color": "orange", "flag": True} cache.set(key, data) print(cache.get(key))
Note
If
redis
URI is configured the cache is store in redis server, otherwise it is cache in memory.