public
|
|
public static
Maslosoft\Cache\Cache
|
#
fly( string $cacheId = self::DefaultCacheId )
Get flyweight instance of Cache component.
Only one instance will be created for each $cacheId .
Get flyweight instance of Cache component.
Only one instance will be created for each $cacheId .
Parameters
Returns
New
|
public
|
|
public
mixed
|
#
get( string $key, callable $callback = null, integer $timeout = null )
Get cached object.
Optionally if fail, call callback and store it's return value.
In this case this will also return callback value.
When using with callback optionally $timeout can be specified.
Parameters
Returns
mixed
Implementation of
|
public
|
#
has( string $key )
Check if cache has key
Parameters
Implementation of
|
public
|
#
set( string $key, mixed $data, integer|null $timeout = null )
Add or replace data to cache
Add or replace data to cache
Parameters
- $key
- $data
- $timeout
- Timeout in seconds. Set to null to use default. Set to 0 to disable timeout.
Implementation of
|
public
|
#
clear( )
Clear all cache values
Implementation of
|
public
|
|
public
|
#
remove( string $key )
Remove key from cache
Parameters
Implementation of
|