# CacheInterface
Chevere\Interfaces\Cache\CacheInterface
# Description
Describes the component in charge of caching PHP variables.
cached.php >>> <?php return 'my cached data';
# Constants
# ILLEGAL_KEY_CHARACTERS
Type string
'\\.\\/\\\\~\\:'
# Methods
# __construct()
# Parameters
- DirInterface
$dir
THROWS
- DirUnableToCreateException if $dir doesn't exists and unable to create
# dir()
Provides access to the cache directory.
RETURN
# withPut()
Put item in cache.
# Parameters
- CacheKeyInterface
$key
- VarStorableInterface
$varStorable
RETURN
self
Return an instance with the specified put.
This method MUST retain the state of the current instance, and return an instance that contains the specified put.
# without()
Remove item from cache.
# Parameters
- CacheKeyInterface
$key
THROWS
- FileUnableToRemoveException if unable to remove the cache file
RETURN
self
Return an instance with the specified removed.
This method MUST retain the state of the current instance, and return an instance that contains the specified removed.
# exists()
Indicates whether the cache exists for the given key.
# Parameters
- CacheKeyInterface
$key
RETURN
bool
# get()
Get a cache item.
# Parameters
- CacheKeyInterface
$key
THROWS
RETURN
# puts()
Provides access to the array containing puts.
RETURN
array
return [
'key' => [
'checksum' => '<file_checksum>',
'path' => '<the_file_path>'
],
];