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

I am logging data in the cache, and I see the following:

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); 
+3
source share
1 answer

Check if the database profiler is enabled. There seems to be a conflict between the DB profiler and Zend_Paginator_Adapter_DbTableSelect .

I also created a new Paginator class that extends Zend_Paginator , and I changed the getItemsByPage function.

 $offset = ($pageNumber - 1) * $this->getItemCountPerPage(); $items = $this->_adapter->getItems($offset, $this->getItemCountPerPage()); 

These two lines of code should be added at the beginning, after $pageNumber = $this->normalizePageNumber($pageNumber) .

0
source

All Articles