Issues

ZF-10390: _getCacheInternalId() only uses adapter name not values

Issue Type: Bug Created: 2010-08-27T10:52:40.000+0000 Last Updated: 2010-08-27T14:26:17.000+0000 Status: Resolved Fix version(s): - 1.10.8 (25/Aug/10)

Reporter: Chinh (ncchinh) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Paginator

Related issues: Attachments:

Description

The way _getCacheInternalId() generate the md5 has at the moment only use classname of the adapter, not the object variables

    return md5(serialize(array(
        get_class($this->getAdapter()),
        $this->getItemCountPerPage()
    )));

So say I have multiple paginated lists that use the same DBTable adapter, each list is a result of a different DB query, they will be mixed if I use caching for the paginator.

The solution could be replacing get_class with get_object_vars, but that requires making adapter variables public instead of protected.

Comments

Posted by Chinh (ncchinh) on 2010-08-27T11:22:39.000+0000

Sorry I mistaken the version, it's 1.10.5 not 1.10.8. It was fixed

Posted by Ramon Henrique Ornelas (ramon) on 2010-08-27T14:26:15.000+0000

Fixed by [~bate] with r22828.

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