中的清除页面缓存如何。总是我的页面的一部分缓存,并且不会通过browser.when中的Ctrl+F5
删除。当我在其视图中更改了名称页面时。 !?我使用CodeIgniter的CodeIgniter
如何清除CodeIgniter中的页面缓存?
中的清除页面缓存如何。总是我的页面的一部分缓存,并且不会通过browser.when中的Ctrl+F5
删除。当我在其视图中更改了名称页面时。 !?我使用CodeIgniter的CodeIgniter
如何清除CodeIgniter中的页面缓存?
它可能在session
。尝试删除您的cookies。
您需要手动删除application/cache
文件夹中的缓存项目。
http://ellislab.com/codeigniter/user-guide/general/caching.html
https://www.codeigniter.com/user_guide/general/caching.html是当前的3.x链接.... –
你可以使用这个简单的插件,以帮助清除单个页面缓存。
function delete_cache($uri_string=null)
{
$CI =& get_instance();
$path = $CI->config->item('cache_path');
$path = rtrim($path, DIRECTORY_SEPARATOR);
$cache_path = ($path == '') ? APPPATH.'cache/' : $path;
$uri = $CI->config->item('base_url').
$CI->config->item('index_page').
$uri_string;
$cache_path .= md5($uri);
return unlink($cache_path);
}
public function clear_path_cache($uri)
{
$CI =& get_instance();
$path = $CI->config->item('cache_path');
$cache_path = ($path == '') ? APPPATH.'cache/' : $path;
$uri = $CI->config->item('base_url').
$CI->config->item('index_page').
$uri;
$cache_path .= md5($uri);
return @unlink($cache_path);
}
/**
* Clears all cache from the cache directory
*/
public function clear_all_cache()
{
$CI =& get_instance();
$path = $CI->config->item('cache_path');
$cache_path = ($path == '') ? APPPATH.'cache/' : $path;
$handle = opendir($cache_path);
while (($file = readdir($handle))!== FALSE)
{
//Leave the directory protection alone
if ($file != '.htaccess' && $file != 'index.html')
{
@unlink($cache_path.'/'.$file);
}
}
closedir($handle);
}
我删除cookies在chrome浏览器,但不能确定。 –
当我改变它的视图名称页面的工作。 !? –
其保存的服务器端,如下所述:http://codeigniter.com/user_guide/general/caching.html – nonchip