-
Notifications
You must be signed in to change notification settings - Fork 34
functions_modules_globalcache
Initializes the globalcache module.
Definition: public function globalcache_init()
Returns: void
Save a value/object in the global cache.
Definition: public function globalcache_set($key, $value, $ttl=false)
Returns: bool
true if ok, false on error
Parameters:
-
string $key
the key of the value -
mixed $value
the object/string to save -
int $ttl
time to live (in seconds) of the caching
Get a value/object from the global cache.
Definition: public function globalcache_get($key, $default=false)
Returns: mixed
The object from the cache or $default
Parameters:
-
string $key
the key of the value -
mixed $default
a default return value if the key can not be found in the cache
Empty the whole cache.
Definition: public function globalcache_clear($expired_only=false)
Returns: bool
true if ok, false on error
Parameters:
-
bool $expired_only
If true, only expired entries will be deleted
Delete a value from the global cache.
Definition: public function globalcache_delete($key)
Returns: bool
true if ok, false on error
Parameters:
-
string $key
the key of the value
Returns information about the cache usage. Note: this currently returns various different information and format thus needs to be streamlined.
Definition: public function globalcache_info()
Returns: mixed
Cache information
Gets a list of all keys in the cache.
Definition: public function globalcache_list_keys()
Returns: array
list of all keys