# CacheInterface

Chevere\Interfaces\Cache\CacheInterface

view source

# 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

  1. DirInterface $dir

THROWS


# dir()

Provides access to the cache directory.


# withAddedItem()

Put item in cache.

# Parameters

  1. CacheKeyInterface $cacheKey
  2. VarExportableInterface $varExportable

RETURN

CacheInterface

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.


# withoutItem()

Remove item from cache.

# Parameters

  1. CacheKeyInterface $cacheKey

THROWS

RETURN

CacheInterface

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

  1. CacheKeyInterface $cacheKey

RETURN

bool


# get()

Get a cache item.

# Parameters

  1. CacheKeyInterface $cacheKey

# puts()

Provides access to the array containing puts.

RETURN

array

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

Last Updated: 8/2/2020, 1:36:58 AM