PHP Class Isswp101\Persimmon\Cache\RuntimeCache

Show file Open project: isswp101/elasticsearch-eloquent

Public Methods

Method Description
containsAttributes ( mixed $key, array $attributes = ['*'] ) : boolean Return true if cache has already given attributes.
forget ( mixed $key ) Remove an item from the cache by key.
get ( mixed $key ) : Model Return instance from cache.
getNotCachedAttributes ( mixed $key, array $attributes = ['*'] ) : array Return the difference between given attributes and attributes which are already cached.
has ( mixed $key ) : boolean Return true if cache contains this key.
keys ( ) : array Return all cache keys.
put ( mixed $key, Model $instance, array $attributes = ['*'] ) : Model Put instance to cache.

Method Details

containsAttributes() public method

Return true if cache has already given attributes.
public containsAttributes ( mixed $key, array $attributes = ['*'] ) : boolean
$key mixed
$attributes array
return boolean

forget() public method

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

get() public method

Return instance from cache.
public get ( mixed $key ) : Model
$key mixed
return Isswp101\Persimmon\Model

getNotCachedAttributes() public method

Return the difference between given attributes and attributes which are already cached.
public getNotCachedAttributes ( mixed $key, array $attributes = ['*'] ) : array
$key mixed
$attributes array
return array

has() public method

Return true if cache contains this key.
public has ( mixed $key ) : boolean
$key mixed
return boolean

keys() public method

Return all cache keys.
public keys ( ) : array
return array

put() public method

Put instance to cache.
public put ( mixed $key, Model $instance, array $attributes = ['*'] ) : Model
$key mixed
$instance Isswp101\Persimmon\Model
$attributes array
return Isswp101\Persimmon\Model