Hi all,

I'm trying to cache the entire class using Zend_Cache_Frontend_Class.

My class instantiation code looks like (yes, $a and $b have to go into the
constructor):

$_myClass = new myClass($a, $b);

After reading ZF manual, I came up with the following code:

$frontendOptions = array(
    'cached_entity' => new myClass($a, $b)
);
$backendOptions = array('cache_dir' => realpath("C:/tmp"));
$cache = Zend_Cache::factory('Class', 'File', $frontendOptions,
$backendOptions);

Now, the problem is, how do I use this $cache to retrieve cached
instantiated object?

Of course, $cache->__construct($a, $b) fails (it also looks stupid - I
already passed $a and $b in).

What to do? Any ideas?

Thanks,
Temuri
-- 
View this message in context: 
http://www.nabble.com/Zend_Cache-with-%27Class%27-frontend---problem-with-__construct%28%24a%2C-%24b%29-tp18834887p18834887.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to