PHP Class Microweber\Utils\Adapters\Cache\LaravelCache

Show file Open project: microweber/microweber

Public Properties

Property Type Description
$app
$cache_hits
$support_tags
$ttl

Public Methods

Method Description
__construct ( $app )
cache_group ( $cache_group )
clear ( ) : boolean Clears all cache data.
debug ( ) : array Prints cache debug information.
delete ( string $cache_group = 'global' ) : boolean Deletes cache for given $cache_group recursively.
get ( string $cache_id, string $cache_group = 'global', boolean $timeout = false ) : mixed Gets the data from the cache.
save ( mixed $data_to_cache, string $cache_id, string $cache_group = 'global', $expiration = false ) : boolean Stores your data in the cache.

Method Details

__construct() public method

public __construct ( $app )

cache_group() public method

public cache_group ( $cache_group )

clear() public method

Clears all cache data.
public clear ( ) : boolean
return boolean

debug() public method

Prints cache debug information.
public debug ( ) : array
return array

delete() public method

Deletes cache for given $cache_group recursively.
public delete ( string $cache_group = 'global' ) : boolean
$cache_group string (default is 'global') - this is the subfolder in the cache dir.
return boolean

get() public method

If data is not found it return false *
public get ( string $cache_id, string $cache_group = 'global', boolean $timeout = false ) : mixed
$cache_id string id of the cache
$cache_group string (default is 'global') - this is the subfolder in the cache dir.
$timeout boolean
return mixed returns array of cached data or false

save() public method

It can store any value that can be serialized, such as strings, array, etc.
public save ( mixed $data_to_cache, string $cache_id, string $cache_group = 'global', $expiration = false ) : boolean
$data_to_cache mixed your data, anything that can be serialized
$cache_id string id of the cache, you must define it because you will use it later to retrieve the cached content.
$cache_group string (default is 'global') - this is the subfolder in the cache dir.
return boolean

Property Details

$app public property

public $app

$cache_hits public property

public $cache_hits

$support_tags public property

public $support_tags

$ttl public property

public $ttl