FileAccess Orion

ConfigCacheInterface

Interface for ConfigCache.

Tags
author

Matthias Pigulla mp@webfactory.de

Table of Contents

getPath()  : string
Gets the cache file path.
isFresh()  : bool
Checks if the cache is still fresh.
write()  : mixed
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.

Methods

getPath()

Gets the cache file path.

public getPath() : string
Return values
string —

The cache file path

isFresh()

Checks if the cache is still fresh.

public isFresh() : bool

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

Return values
bool —

Whether the cache is still fresh

write()

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.

public write(string $content[, array<string|int, ResourceInterface>|null $metadata = null ]) : mixed
Parameters
$content : string

The content to write into the cache

$metadata : array<string|int, ResourceInterface>|null = null

An array of ResourceInterface instances

Tags
throws
RuntimeException

When the cache file cannot be written

Return values
mixed —

Search results