Class: SmartCache - Provides per Execution, Volatille Cache (in-PHP-Memory).
This cache type is volatille, not persistent and will reset after each PHP execution.
Because this kind of cache is per-execution, the key values will not be shared between executions.
It is intended to be used on per-execution optimizations to avoid repetitive
execution of complex high-cost methods that would output the same result under
the same execution conditions as: same environment / same parameters / same client.
Language: PHP
Located at: lib/framework/lib_caching.php
Package: @Core
Namespace: \
Class Name: SmartCache
Version: v.20221220
Depends: classes: Smart, SmartEnvironment
Usage: static object: Class::method() - This class provides only STATIC methods
class Methods
public staticfunctionkeyExists (
string$y_realm,
string$y_key
) {} :: BOOL
@return: {BOOLEAN} TRUE if Key Exists or FALSE if not
@param: {STRING} $y_realm: The Cache Realm
@param: {STRING} $y_key: The Cache Key
Check if a Key exists in the non-persistent Cache
public staticfunctiongetKey (
string$y_realm,
string$y_key
) {} :: MIXED
@return: {MIXED} The value of the stored key or NULL if key not found in cache
@param: {STRING} $y_realm: The Cache Realm
@param: {STRING} $y_key: The Cache Key
Get a Key from the non-persistent Cache
public staticfunctionsetKey (
string$y_realm,
string$y_key,
MIXED$y_value
) {} :: BOOL
@return: {BOOLEAN} Always returns true
@param: {STRING} $y_realm: The Cache Realm
@param: {STRING} $y_key: The Cache Key
@param: {MIXED} $y_value: The value to be stored
Set a Key into the non-persistent Cache
public staticfunctionunsetKey (
string$y_realm,
string$y_key
) {} :: BOOL
@return: {BOOLEAN} Always returns true
@param: {STRING} $y_realm: The Cache Realm
@param: {STRING} $y_key: The Cache Key
Unset a Key into the non-persistent Cache
class Properties
class Constants
documentation generated on: 2023-10-19 23:15:44 +0000
This cache type is volatille, not persistent and will reset after each PHP execution.
Because this kind of cache is per-execution, the key values will not be shared between executions.
It is intended to be used on per-execution optimizations to avoid repetitive
execution of complex high-cost methods that would output the same result under
the same execution conditions as: same environment / same parameters / same client.