class ConfigCache extends ResourceCheckerConfigCache

ConfigCache caches arbitrary content in files on disk.

When in debug mode, those metadata resources that implement \Symfony\Component\Config\Resource\SelfCheckingResourceInterface will be used to check cache freshness.

Methods

__construct(string $file, bool $debug)

No description

string
getPath()

Gets the cache file path.

bool
isFresh()

Checks if the cache is still fresh.

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

Writes cache.

Details

at line line 34
__construct(string $file, bool $debug)

Parameters

string $file The absolute cache path
bool $debug Whether debugging is enabled or not

in ResourceCheckerConfigCache at line line 49
string getPath()

Gets the cache file path.

Return Value

string The cache file path

at line line 54
bool isFresh()

Checks if the cache is still fresh.

This implementation always returns true when debug is off and the cache file exists.

Return Value

bool Whether the cache is still fresh

in ResourceCheckerConfigCache at line line 119
write(string $content, array $metadata = null)

Writes cache.

Parameters

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

Exceptions

RuntimeException When cache file can't be written