mirror of
https://github.com/Mibew/handlebars.php.git
synced 2025-05-02 18:26:40 +03:00
Add cache->set method to engine
Signed-off-by: fzerorubigd <fzerorubigd@gmail.com>
This commit is contained in:
parent
eba64322c5
commit
c550491841
@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache interface
|
* Cache interface
|
||||||
* Base cache interface
|
* Base cache interface, Note that Handlebars.php never call for remove.
|
||||||
|
* Driver should take care of expiered cache.
|
||||||
*
|
*
|
||||||
* @category Xamin
|
* @category Xamin
|
||||||
* @package Handlebars
|
* @package Handlebars
|
||||||
|
@ -432,6 +432,7 @@ class Handlebars_Engine
|
|||||||
if ($tree === false) {
|
if ($tree === false) {
|
||||||
$tokens = $this->getTokenizer()->scan($source);
|
$tokens = $this->getTokenizer()->scan($source);
|
||||||
$tree = $this->getParser()->parse($tokens);
|
$tree = $this->getParser()->parse($tokens);
|
||||||
|
$this->getCache()->set($hash, $tree);
|
||||||
}
|
}
|
||||||
return $tree;
|
return $tree;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user