简体   繁体   中英

Issue caching Zend_Paginator with DB profiler enabled

I am having a bizarre issue when trying to cache Zend_Paginator and having the Zend_Db_Adapter profiler enabled.

It creates a cache file, but each ID is different meaning that the cache hit will never happen.

After disabling the profiler everything works as expected. What is going on here? And is it possible to get the cache working with the profiler?

There are bug reports regarding this issue with zend Framework. Eg. this one: ZF Bug 8731 .

The problem is that the serialized object (Zend_Paginator_Adapter_DbSelect) when Zend_Db_Profiler is enable, has also included a unique time measurement queries. So we can be 100% sure that the result of function md5() will be different every time.

This related bug has been fixed in 1.12: ZF Bug 6989 . If you can update the framework, you should.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM