ecshop caches缓存 memcached 失效时间 1小时
2014年12月11日10:44:34
最新修正无错
顺带解决了ecshop采用自定义分类模板缓存问题
修改修改的文件 includes/cls_template.php
$memcache->set($CacheID , '<?php exit;?>' . $data . $out , 0 , 3600);
| | | |
key 数据 压缩 失效时间(秒)
需要的请自行替换对应函数
如有错误请指正 Q:174001602
/**
* 处理模板文件
*
* @access public
* @param string $filename
* @param sting $cache_id
*
* @return sring
*/
function fetch($filename, $cache_id = '')
{
if (!$this->_seterror)
{
error_reporting(E_ALL ^ E_NOTICE);
}
$this->_seterror++;
if (strncmp($filename,'str:', 4) == 0)
{
$out = $this->_eval($this->fetch_str(substr($filename, 4)));
}
else
{
if ($this->_checkfile)
{
if (!file_exists($filename))
{
$filename = $this->template_dir . '/' . $filename;
}
}
else
{
$filename = $this->template_dir . '/' . $filename;
}
if ($this->direct_output)
{
$this->_current_file = $filename;
$out = $this->_eval($this->fetch_str(file_get_contents($filename)));