Open fredriktid opened 3 years ago
Hi!
Thanks for the issue and the research!
However, Tags Bundle only reuses configuration from eZ Platform/Ibexa kernel and does not control cache pool at all. So any changes to default config should be done on eZ repos, not here.
I hope this makes sense to you?
Thanks for the quick reply. Your description would be the expected behaviour but we're experiencing something else.
redis:6379[1]> TTL namespace:ez-content-info-27475
(integer) 29159
redis:6379[1]> TTL namespace:netgen-tag-2466-0-1
(integer) 29101
redis:6379[1]> TTL namespace:tag-tag-6161
(integer) -1
redis:6379[1]> TTL namespace:tag-content-14291
(integer) -1
It seems to me that eZ-keys (prefixed with ez:
) all have a TTL, but some keys from this bundle don't. When I run the following command to list all keys without a TTL, only keys named tag-*
are returned.
redis-cli -n 1 keys "*" | while read LINE ; do TTL=`redis-cli -n 1 ttl "$LINE"`; if [ $TTL -eq -1 ]; then echo "$LINE"; fi; done;
Though I haven't dived into your code enough to point out any bugs yet.
It might be that eZ made some modifications to their caching layer since the last time anyone touched the cache layer here in Tags Bundle. That seems to me the most reasonable asumption.
If you have time, it would be appreciated if you can look into it. I will try to find some time too.
Absolutely, I'll try to find some time in the following days.
When inspecting Redis keys from this bundle they're missing expiration/TTL:
To avoid maxing out Redis memory with the "volatile-lru" eviction strategy one can define a "default_lifetime" in
app/config/cache_pool/cache.redis.yml
.volatile-lru states that:
Expected behaviour would be that cache items are given a TTL when defined in Symfony.
Would be great to have some feedback on this. We could possibly provide a PR.