interface ConfigCacheInterface

Interface for ConfigCache.

Methods

string
getPath()

Gets the cache file path.

bool
isFresh()

Checks if the cache is still fresh.

write(string $content, array $metadata = null)

Writes the given content into the cache file. Metadata will be stored independently and can be used to check cache freshness at a later time.

Details

at line line 28
string getPath()

Gets the cache file path.

Return Value

string The cache file path

at line line 37
bool isFresh()

Checks if the cache is still fresh.

This check should take the metadata passed to the write() method into consideration.

Return Value

bool Whether the cache is still fresh

at line line 48
write(string $content, array $metadata = null)

Writes the given content into the cache file. Metadata will be stored independently and can be used to check cache freshness at a later time.

Parameters

string $content The content to write into the cache
array $metadata An array of ResourceInterface instances

Exceptions

RuntimeException When the cache file cannot be written