Documentation

ConfigCacheInterface

Interface for ConfigCache.

Tags
author

Matthias Pigulla mp@webfactory.de

Table of Contents

Methods

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

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

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


        
On this page

Search results