Using cache

Cache providers are available to use through properties in the Cache module. For example, to set the key myKey into the cache provider fast, use the CacheProvider::set method, like this:

$value = $e->Cache->fast->set("myKey", "value", \Cherrycake\CACHE_TTL_5_MINUTES);

And CacheProvider::get to set a value into a cache key:

$value = $e->Cache->fast->get("myKey")

Last updated