\Phug\RendererCacheInterface

Summary

Methods
Constants
cache()
cacheFile()
cacheFileIfChanged()
displayCached()
cacheDirectory()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

cache()

cache(  $path, string  $input, callable  $rendered, boolean  $success = null) : string

Return the cached file path after cache optional process.

Parameters

$path
string $input

pug input

callable $rendered

method to compile the source into PHP

boolean $success

Returns

string

cacheFile()

cacheFile(string  $path) : boolean

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

Parameters

string $path

Returns

boolean

cacheFileIfChanged()

cacheFileIfChanged(string  $path) : boolean

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

Parameters

string $path

Returns

boolean

displayCached()

displayCached(string  $path, string  $input, callable  $rendered, array  $variables, boolean  $success = null) 

Parameters

string $path

path to pug file

string $input

pug input

callable $rendered

method to compile the source into PHP

array $variables

local variables

boolean $success

Throws

\InvalidArgumentException
\Exception

cacheDirectory()

cacheDirectory(string  $directory) : array

Parameters

string $directory

the directory to search in pug templates

Returns

array —

count of cached files and error count