interface CacheWarmerInterface implementsWarmableInterface

Interface for classes able to warm up the cache.

Methods

array
warmUp(string$cacheDir,string$buildDir =null)

Warms up the cache.

bool
isOptional()

Checks whether this warmer is optional or not.

Details

array warmUp(string$cacheDir,string$buildDir =null)

Warms up the cache.

Parameters

string $cacheDir Where warm-up artifacts should be stored
string $buildDir Where read-only artifacts should go; null when called after compile-time

Return Value

array A list of classes or files to preload

bool isOptional()

Checks whether this warmer is optional or not.

Optional warmers can be ignored on certain conditions.

A warmer should return true if the cache can be generated incrementally and on-demand.

Return Value

bool