New cache system with subdirectories

This commit is contained in:
Michael Vogel 2012-11-17 00:50:39 +01:00
commit f17377e6de
7 changed files with 83 additions and 86 deletions

View file

@ -962,13 +962,11 @@ if(! function_exists('prepare_body')) {
function prepare_body($item,$attach = false) {
$a = get_app();
call_hooks('prepare_body_init', $item);
call_hooks('prepare_body_init', $item);
$cache = get_config('system','itemcache');
if (($cache != '')) {
$cachefile = $cache."/".$item["guid"]."-".strtotime($item["edited"])."-".hash("crc32", $item['body']);
$cachefile = get_cachefile($item["guid"]."-".strtotime($item["edited"])."-".hash("crc32", $item['body']));
if (($cachefile != '')) {
if (file_exists($cachefile))
$s = file_get_contents($cachefile);
else {