Add cache->set method to engine

Signed-off-by: fzerorubigd <fzerorubigd@gmail.com>
This commit is contained in:
fzerorubigd 2013-02-27 23:48:19 +03:30
parent eba64322c5
commit c550491841
No known key found for this signature in database
GPG Key ID: D6EE858AF9D2999A
2 changed files with 49 additions and 47 deletions

View File

@ -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

View File

@ -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;
} }