-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why the backend cache redis add the special key(statsKey) _PHCR #10905
Comments
It exists to be able to flush the Redis cache from phalcon. It is disabled by default in the 2.0.x branch now though. |
@Green-Cat it is a good idea. So flushing cache can realize via PHP code not impacted by KV Redis. |
This was referenced Nov 12, 2015
Closed
Closed
pantaovay
added a commit
to pantaovay/cphalcon
that referenced
this issue
Mar 30, 2016
# Changes 1. Modify cache redis backend, delete _PHCR 2. Cache redis backend supports "client" option, now you can pass a redis client # Why 1. The redis cache backend use a special key _PHCR to store all keys used by cache. There is a issue: phalcon#10905 .According to @Green-Cat ,it is disabled in 2.0.x branch which is not true. If use _PHCR, every time we set a cache, we have to run sAdd and set commands. Store all keys in _PHCR will cause it expands quickly and this will influence performance. 2. The previous implementation mixes statsKey and prefix, it uses _PHCR as super prefix which is not needed. 3. The cache backend doesn't support redis option which means that we can not pass a redis connection. So if we use modelsCache and modelsMetadata, there will be two redis connections. So I modify this part and let redis option be supported, and through the lifetime of a request we can use one redis connection.
This was referenced Nov 1, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
when the cache is expired, the key still exists in statsKey _PHCR, why design this sepcial key store all the index keys?
The text was updated successfully, but these errors were encountered: