PHP Class ManaPHP\Cache

Inheritance: extends Component, implements manaphp\CacheInterface
Show file Open project: manaphp/manaphp

Public Properties

Property Type Description
$adapter ManaPHP\Cache\AdapterInterface

Protected Properties

Property Type Description
$_prefix string

Public Methods

Method Description
__construct ( string | array | ManaPHP\Cache\AdapterInterface $options = [] ) Cache constructor.
delete ( string $key ) : void
exists ( string $key ) : boolean
get ( string $key ) : mixed | false
set ( string $key, mixed $value, integer $ttl ) : void
setDependencyInjector ( ManaPHP\DiInterface $dependencyInjector ) : static

Method Details

__construct() public method

Cache constructor.
public __construct ( string | array | ManaPHP\Cache\AdapterInterface $options = [] )
$options string | array | ManaPHP\Cache\AdapterInterface

delete() public method

public delete ( string $key ) : void
$key string
return void

exists() public method

public exists ( string $key ) : boolean
$key string
return boolean

get() public method

public get ( string $key ) : mixed | false
$key string
return mixed | false

set() public method

public set ( string $key, mixed $value, integer $ttl ) : void
$key string
$value mixed
$ttl integer
return void

setDependencyInjector() public method

public setDependencyInjector ( ManaPHP\DiInterface $dependencyInjector ) : static
$dependencyInjector ManaPHP\DiInterface
return static

Property Details

$_prefix protected property

protected string $_prefix
return string

$adapter public property

public AdapterInterface,ManaPHP\Cache $adapter
return ManaPHP\Cache\AdapterInterface