We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Redis in Phalcon2 problem with function get

Hi!,

in https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/cache/backend/redis.zep

where is setted the redis key timeout in get funcion? lifetime isn't used.

Function get don't refresh expire time.



43.9k
edited Jan '15

Hi,

I'm not an expert at all with redis caching, but, imho, redis is used as a backend for caching datas, and frontend looks like it is the one who manage the lifetime cache.

look at this: https://docs.phalcon.io/en/latest/reference/cache.html#caching-behavior

Edit: but after having a deeper look at zep source code for redis cache backend (https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/cache/backend/redis.zep#L203) and apc cache backend (https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/cache/backend/apc.zep#L106), it appears that they are node exactly coded the same. Can this be a reason ?



2.9k

Hi, thanks

I think the expire time is not updated in any cache class (redis, apc....). The lifetime argument is not used in any line. Is a bug?