PHP Classes

Problem with caching

Recommend this page to a friend!

      Cache output and objects  >  All threads  >  Problem with caching  >  (Un) Subscribe thread alerts  
Subject:Problem with caching
Summary:Problem with caching
Messages:1
Author:vunguyen
Date:2008-08-10 16:35:14
 

 


  1. Problem with caching   Reply   Report abuse  
Picture of vunguyen vunguyen - 2008-08-10 16:35:14
I was having some problem with this:
I have a file which includes several files which include even more files.

I do it some thing like this

$cache = new Cache($this->getFileCorrectPath(SFW::getAbsolutePath('cache')));

if($cache->save("cache.test_02_part1.tmp",10, array(&$data)))
{ ob_start();
$template = $this;
foreach($this->_data as $element)
extract($element, EXTR_SKIP);

include($path);

$data = ob_get_contents();
ob_get_clean();
}
The cache seems to cache only the content of the first file ($path), not the file it includes after that.