zend-cache

Zend_Paginator and cache. How can I read the datas that I have sent to cache

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 19:49:54
I register the data to cache and I see the foliowing : zend_cache---Zend_Paginator_1_42242d5fa3c4e4b7758810c276163e8a but I can't read. $request = $this->getRequest(); $q = new Model(); $paginator = Zend_Paginator::factory($q->fetchAll()); $paginator->setCurrentPageNumber($request->getParam('p')); $paginator->setItemCountPerPage(40); $this->view->q = $paginator; $fO = array('lifetime' => 3600, 'automatic_serialization' => true); $bO = array('cache_dir'=> APPLICATION_PATH . '/cache/'); $cache = Zend_cache::factory('Core', 'File', $fO, $bO); Zend_Paginator::setCache($cache); Check to see if DB

How do I set expire time for Zend Cache Storage?

萝らか妹 提交于 2019-12-04 09:54:03
I would like to store some XML in a Zend filesystem cache and have it expire after 30 minutes. How does one set the cache duration / expiry? I am using Zend cache as a component and not in the context of a full ZF2 application. $cache = \Zend\Cache\StorageFactory::factory(array( 'adapter' => array( 'name' => 'filesystem', 'ttl' => 60, // kept short during testing 'options' => array('cache_dir' => __DIR__.'/cache'), ), 'plugins' => array( // Don't throw exceptions on cache errors 'exception_handler' => array( 'throw_exceptions' => false ), ) )); $key = 'spektrix-events'; $events = new

Zend_Cache: After loading cached data, character encoding seems messed up

爷,独闯天下 提交于 2019-11-29 13:04:48
First; On my development server (localhost; default XAMPP on OSX) everything works fine, though when I deploy the exact same code (and data) to the staging server (managed Apache2 on Redhat) it breaks. I'm caching some data using Zend_Cache using the File backend and auto-serialization. Special characters used in the original data display fine, though when they are loaded from cache they're all garbled up. Anyone got a clue? PS. Instead of just a workaround, I'm looking for a way to understand what might go "wrong" on the staging server. What could possibly mess this up? UPDATE The data I'm

Zend_Cache: After loading cached data, character encoding seems messed up

落花浮王杯 提交于 2019-11-28 06:43:12
问题 First; On my development server (localhost; default XAMPP on OSX) everything works fine, though when I deploy the exact same code (and data) to the staging server (managed Apache2 on Redhat) it breaks. I'm caching some data using Zend_Cache using the File backend and auto-serialization. Special characters used in the original data display fine, though when they are loaded from cache they're all garbled up. Anyone got a clue? PS. Instead of just a workaround, I'm looking for a way to