Issues

ZF-9935: Same cache in Zend_Paginator for different items

Issue Type: Bug Created: 2010-06-02T11:46:42.000+0000 Last Updated: 2010-06-03T05:03:44.000+0000 Status: Resolved Fix version(s): - 1.11.0 (02/Nov/10)

Reporter: Nicolas Ruflin (ruflin) Assignee: Marco Kaiser (bate) Tags: - Zend_Paginator

Related issues: Attachments:

Description

In release 1.10.5 the following code in Zend_Paginator was changed:

<pre class="highlight">
return md5(serialize($this->getAdapter()) . $this->getItemCountPerPage());

to

<pre class="highlight">
return md5(serialize(array(
       get_class($this->getAdapter()),
       $this->getItemCountPerPage()
)));

This assumes that a Zend_Paginator_Adapter class is used only once in the whole application. I'm using a modified version of the DbSelect adapter so that the adapter is loaded with different Zend_Db_Select objects. But with the current caching implementation, this always leads to the same cache id because only the class name and the item counter are serialized which are the same for all objects.

Comments

Posted by Marco Kaiser (bate) on 2010-06-02T23:08:19.000+0000

Hi,

this has been fixed with r22307. http://framework.zend.com/code/browse/…=

Posted by Nicolas Ruflin (ruflin) on 2010-06-03T05:03:44.000+0000

Ok, I didn't check the actual source code. Thanks for the fix.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts