ZF-4801: Allow Zend_Paginator to cache its data throught a Zend_Cache_Core instance
Description
It could be very usefull to provide a way for Zend_Paginator to cache its data.
When Zend_Paginator reads actual data, it stores them into a sort of cache : $_pageItems, but those data does not persist throught HTTP requests as they are just stored in an object property. If Zend_Paginator could be given a Zend_Cache_Core instance, it could use it to store data in a 'real' cache, making seeking throught the pages easier and quicker. Also, this would prevent the final user from inventing such a system.
Comments
Posted by Matthew Ratzloff (mratzloff) on 2008-12-09T13:14:16.000+0000
This is a planned future enhancement.
Posted by julien PAULI (doctorrock83) on 2008-12-09T15:33:50.000+0000
If I can find time, I can provide a usefull patch, stay tuned
Posted by julien PAULI (doctorrock83) on 2008-12-22T08:02:55.000+0000
Patch for Zend_Paginator and tests is attached; waiting for Zend approval
Posted by julien PAULI (doctorrock83) on 2008-12-23T02:25:47.000+0000
Added the feature at r13439
Posted by fgibaux (fgibaux) on 2009-05-20T07:35:49.000+0000
I think using spl_object_hash to generate the cache id is a bad idea : it depends on the internal object handle and handler table pointer. I encounter cache collision when I have multiple paginator objects.
Posted by julien PAULI (doctorrock83) on 2009-05-20T08:36:52.000+0000
Reported at ZF-6746, on it