# CacheInterface

Chevere\Interfaces\Cache\CacheInterface

view source (opens new window)

# 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

Throws


# dir

Provides access to the cache directory.


# withPut

Put item in cache.

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

Throws

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

Return

bool


# get

Get a cache item.

Parameters


# puts

Provides access to the array containing puts.

Return

array

return [
     'key' => [
             'checksum' => '<file_checksum>',
             'path' => '<the_file_path>'
     ],
];

Last Updated: 5/1/2021, 2:31:10 PM