forked from phalcon/cphalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# 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.
- Loading branch information
Showing
1 changed file
with
54 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters