StaticCacheTrait
trait StaticCacheTrait
Static Cache Trait Adds a static (per request) cache to the object which can hold data for the time of the request (in the frontend) or a certain duration during long running processes. It works together with the global caching system and enforces a static cache clearing in case of global cache clearings as well.
Expected Behavior:
- Caches during the whole request for local caching
- Caches are cleared when lib->cache->clear_cache() or clear_request_cache() is called
- During config->is_install_mode the cache is inactive
- Endless running daemon processes automatically clears the static cache after some time to enforce an update
Methods
No description
Clears the specified cache pool from the static cache
Retrieves a value from the static cache
Returns an array of all cache keys which have been set
Returns an key/value array with all cached values from the passed pool
No description
Checks if the passed is key has a value set
Removes the passed key
Store a value in the static cache
Details
at line 121
static void
staticCacheClearAllCachePools()
No description
at line 114
static void
staticCacheClearCachePool($cache_pool = 'default')
Clears the specified cache pool from the static cache
at line 61
static array|string|int|bool|null
staticCacheGet($key, string $cache_pool = 'default')
Retrieves a value from the static cache
at line 98
static array
staticCacheGetKeys(string $cache_pool = 'default')
Returns an array of all cache keys which have been set
at line 107
static array
staticCacheGetPool($cache_pool)
Returns an key/value array with all cached values from the passed pool
at line 34
static bool
staticCacheIsEnabled()
No description
at line 85
static bool
staticCacheIsSet($key, string $cache_pool = 'default')
Checks if the passed is key has a value set
at line 73
static
staticCacheRemove($key, string $cache_pool = 'default')
Removes the passed key
at line 46
static void
staticCacheSet(string|int $key, mixed $value, string $cache_pool = 'default')
Store a value in the static cache