config/cache.pyfile. In this file, you can specify different cache stores with a name via the
STORESdictionary and the default to use in your application with the
storage/framework/cachein projet root directory but can be changed with
redispython package, that you can install with:
pymemcachepython package, that you can install with:
addmethod. This will either fetch the data already in the cache, if it is not expired, or it will insert the new value.
agekey exists in the cache AND it is not expired, then "21" will be added to the cache and returned. If the
agekey does not exist or is not expired then it will return whatever data is in the cache for that key.
putmethod will put data into the cache regardless of if it exists already. This is a good way to overwrite data in the cache:
Noneto keep the data forever.
Noneor the default you specify: