colinmollenhour / Cm_Cache_Backend_Redis

A Zend_Cache backend for Redis with full support for tags (works great with Magento)
Other
390 stars 142 forks source link

Fix when get Object(Credis_Client) to decode #152

Closed ilnytskyi closed 4 years ago

ilnytskyi commented 4 years ago

https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/151

colinmollenhour commented 4 years ago

The object return value definitely should not be getting returned for the hGet call so in that way this is a correct change. However, I think the bigger question is why is that being returned in the first place.. It only returns itself in the case of it being in a pipeline or transaction so somehow some state management is getting off. E.g. maybe a command is failing and the "pipeline" state is not getting reset on reconnection. Are you using persistent connections? If you are, the bug may be here since it is not resetting the state management flags when the connection is persistent:

https://github.com/colinmollenhour/credis/blob/master/Client.php#L554