From 1723095862b9e3ba888cb649d0539e7729f8ad19 Mon Sep 17 00:00:00 2001 From: uwetews Date: Wed, 23 Dec 2015 04:27:56 +0100 Subject: [PATCH] caching observes now template_dir setting --- tests/PHPUnit_Smarty.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/PHPUnit_Smarty.php b/tests/PHPUnit_Smarty.php index 0685bd90..ff4d16dd 100644 --- a/tests/PHPUnit_Smarty.php +++ b/tests/PHPUnit_Smarty.php @@ -503,7 +503,7 @@ KEY `expire` (`expire`) $_cache_id = isset($cache_id) ? preg_replace('![^\w\|]+!', '_', $cache_id) : null; $sp = $this->buildSourcePath($tpl, $name, $type, $dir); $uid = $this->buildUid($tpl, $sp, $name, $type); - $_filepath = $uid; + $_filepath = sha1($uid . $this->smarty->_joined_template_dir); // if use_sub_dirs, break file into directories if ($sub) { $_filepath = @@ -531,7 +531,7 @@ KEY `expire` (`expire`) $sp = $this->buildSourcePath($tpl, $name, $type, $dir); $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null; $_cache_id = isset($cache_id) ? preg_replace('![^\w\|]+!', '_', $cache_id) : null; - return sha1($sp . $_cache_id . $_compile_id); + return sha1($sp . $_cache_id . $_compile_id); default: throw new Exception("Unhandled cache resource type '{$cacheType}'"); }