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.
__construct(string $file, bool $debug) | ||
string | getPath() Gets the cache file path. | from ResourceCheckerConfigCache |
bool | isFresh() Checks if the cache is still fresh. | |
write(string $content, array $metadata = null) Writes cache. | from ResourceCheckerConfigCache |
string | $file | The absolute cache path |
bool | $debug | Whether debugging is enabled or not |
Gets the cache file path.
string | The cache file path |
Checks if the cache is still fresh.
This implementation always returns true when debug is off and the cache file exists.
bool | Whether the cache is still fresh |
Writes cache.
string | $content | The content to write into the cache |
array | $metadata | An array of ResourceInterface instances |
RuntimeException | When cache file can't be written |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Config/ConfigCache.html