You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently our plugin doing the cache clearing ourself (on shutdown). And when we want to get cache we get multiple keys (real value and locked value).
All of this makes redis not useful. For what we do all of this if redis already do that? Redis have LFU which is much more smart when deleting expired cache. We just need to pass ttl when setting the cache. And redis will take care of the rest.
For locking the key it still make sense. But we can optimize it by implementing redis way using either Redlock / SETNX / WATCH.
For deleting expired cache let redis do it.
Then when comparing with disk cache, we even get similar result (redis is reading from ram, logically it should be much much much faster then reading from disk)
Now the benchmark: (100visits/sec for 10 minutes)
W3 Total Cache (disk basic cache): avg 365ms
Pressijitsu redis cache (localhost): avg 368 ms
WP redis cache (localhost): avg 41ms
The text was updated successfully, but these errors were encountered:
Currently our plugin doing the cache clearing ourself (on shutdown). And when we want to get cache we get multiple keys (real value and locked value).
All of this makes redis not useful. For what we do all of this if redis already do that? Redis have LFU which is much more smart when deleting expired cache. We just need to pass ttl when setting the cache. And redis will take care of the rest.
For locking the key it still make sense. But we can optimize it by implementing redis way using either Redlock / SETNX / WATCH.
For deleting expired cache let redis do it.
When we compare our plugin with other similar page cache plugin (using redis) like WP Redis Cache. We left behind so much:
=> https://github.com/BenjaminAdams/wp-redis-cache
Then when comparing with disk cache, we even get similar result (redis is reading from ram, logically it should be much much much faster then reading from disk)
Now the benchmark: (100visits/sec for 10 minutes)
W3 Total Cache (disk basic cache): avg 365ms
Pressijitsu redis cache (localhost): avg 368 ms
WP redis cache (localhost): avg 41ms
The text was updated successfully, but these errors were encountered: