interface ConfigCacheFactoryInterface

Interface for a ConfigCache factory. This factory creates an instance of ConfigCacheInterface and initializes the cache if necessary.

Methods

cache(string $file, callable $callable)

Creates a cache instance and (re-)initializes it if necessary.

Details

at line line 31
ConfigCacheInterface cache(string $file, callable $callable)

Creates a cache instance and (re-)initializes it if necessary.

Parameters

string $file The absolute cache file path
callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback

Return Value

ConfigCacheInterface $configCache The cache instance