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

Handle LOADING state as if key was not found. #171

Closed colinmollenhour closed 1 year ago

colinmollenhour commented 1 year ago

This PR attempts to address the "LOADING Redis is loading the dataset in memory" error first reported in https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/pull/134 - that PR seems to not work fully as intended as an exception is thrown instead of false returned when this error occurs - perhaps this was changed long ago in an older version of Redis.

Also, when master incurs a LOADING error (e.g. as could happen briefly in case there was a failover mid-request) it will wait one time for one second and make a second attempt to hopefully reduce the impact of the LOADING error while not putting the server in jeopardy for a longer wait time.