mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- new feature Caching does now observe the template_dir setting and will create separate cache files if required
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user