PHP Class Microweber\Utils\Adapters\Cache\CacheStore

Show file Open project: microweber/microweber

Public Properties

Property Type Description
$adapter Microweber\Utils\Adapters\Cache\Storage\FileStorage

Public Methods

Method Description
__construct ( $prefix = '' )
decrement ( string $key, mixed $value = 1 ) Increment the value of an item in the cache.
flush ( $all = false ) Remove all items from the cache.
forever ( string $key, mixed $value ) Store an item in the cache indefinitely.
forget ( string $key ) Remove an item from the cache.
forgetTags ( string $string ) Remove an item from the cache by tags.
get ( string $key ) : mixed Retrieve an item from the cache by key.
increment ( string $key, mixed $value = 1 ) Increment the value of an item in the cache.
put ( string $key, mixed $value, integer $minutes ) Store an item in the cache for a given number of minutes.
remember ( string $key, DateTime | integer $minutes, Closure $callback ) : mixed Get an item from the cache, or store the default value.
rememberForever ( string $key, Closure $callback ) : mixed Get an item from the cache, or store the default value forever.
setAdapter ( $adapter )
tags ( $tags ) : object Tags for cache.

Method Details

__construct() public method

public __construct ( $prefix = '' )

decrement() public method

Increment the value of an item in the cache.
public decrement ( string $key, mixed $value = 1 )
$key string
$value mixed

flush() public method

Remove all items from the cache.
public flush ( $all = false )

forever() public method

Store an item in the cache indefinitely.
public forever ( string $key, mixed $value )
$key string
$value mixed

forget() public method

Remove an item from the cache.
public forget ( string $key )
$key string

forgetTags() public method

Remove an item from the cache by tags.
public forgetTags ( string $string )
$string string

get() public method

Retrieve an item from the cache by key.
public get ( string $key ) : mixed
$key string
return mixed

increment() public method

Increment the value of an item in the cache.
public increment ( string $key, mixed $value = 1 )
$key string
$value mixed

put() public method

Store an item in the cache for a given number of minutes.
public put ( string $key, mixed $value, integer $minutes )
$key string
$value mixed
$minutes integer

remember() public method

Get an item from the cache, or store the default value.
public remember ( string $key, DateTime | integer $minutes, Closure $callback ) : mixed
$key string
$minutes DateTime | integer
$callback Closure
return mixed

rememberForever() public method

Get an item from the cache, or store the default value forever.
public rememberForever ( string $key, Closure $callback ) : mixed
$key string
$callback Closure
return mixed

setAdapter() public method

public setAdapter ( $adapter )

tags() public method

Tags for cache.
public tags ( $tags ) : object
return object

Property Details

$adapter public property

public FileStorage,Microweber\Utils\Adapters\Cache\Storage $adapter
return Microweber\Utils\Adapters\Cache\Storage\FileStorage