- new feature Caching does now observe the template_dir setting and will create separate cache files if required

This commit is contained in:
uwetews
2015-12-24 02:26:31 +01:00
parent 5c377637e1
commit 9d0865aaf8
2 changed files with 2 additions and 2 deletions

View File

@@ -84,7 +84,7 @@ abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource
{
$_cache_id = isset($cached->cache_id) ? preg_replace('![^\w\|]+!', '_', $cached->cache_id) : null;
$_compile_id = isset($cached->compile_id) ? preg_replace('![^\w]+!', '_', $cached->compile_id) : null;
$path = $cached->source->filepath . $_template->smarty->_joined_template_dir. $_cache_id . $_compile_id;
$path = $cached->source->uid . $_cache_id . $_compile_id;
$cached->filepath = sha1($path);
if ($_template->smarty->cache_locking) {
$cached->lock_id = sha1('lock.' . $path);

View File

@@ -54,7 +54,7 @@ abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource
*/
public function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)
{
$cached->filepath = sha1($_template->source->uid . $_template->smarty->_joined_template_dir) . '#' . $this->sanitize($cached->source->resource) . '#' .
$cached->filepath = sha1($_template->source->uid) . '#' . $this->sanitize($cached->source->resource) . '#' .
$this->sanitize($cached->cache_id) . '#' . $this->sanitize($cached->compile_id);
$this->populateTimestamp($cached);