\Phug\Renderer\PartialCacheTrait

Summary

Methods
Properties
Constants
cacheFile()
cacheFileIfChanged()
cacheDirectory()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
getCacheAdapter()
No private properties found
N/A

Methods

cacheFile()

cacheFile(string  $path) : boolean|integer

Cache a template file in the cache directory (even if the cache is up to date).

Returns the number of bytes written in the cache file or false if a failure occurred.

Parameters

string $path

Returns

boolean|integer

cacheFileIfChanged()

cacheFileIfChanged(string  $path) : boolean|integer

Cache a template file in the cache directory if the cache is obsolete.

Returns true if the cache is up to date and cache not change, else returns the number of bytes written in the cache file or false if a failure occurred.

Parameters

string $path

Returns

boolean|integer

cacheDirectory()

cacheDirectory(  $directory) : array

Cache all templates in a directory in the cache directory you specified with the cache_dir option.

You should call after deploying your application in production to avoid a slower page loading for the first user.

Parameters

$directory

Returns

array