Zend Framework

_getCacheInternalId() only uses adapter name not values

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.10.5
  • Fix Version/s: 1.10.8
  • Component/s: Zend_Paginator
  • Labels:
    None

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.

Activity

Hide
Chinh added a comment -

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

Show
Chinh added a comment - Sorry I mistaken the version, it's 1.10.5 not 1.10.8. It was fixed
Hide
Ramon Henrique Ornelas added a comment -

Fixed by Marco Kaiser with r22828.

Show
Ramon Henrique Ornelas added a comment - Fixed by Marco Kaiser with r22828.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: