Closed
Description
Symfony version(s) affected: 4.4.1
Description
I see this warning in the logs:
cache.WARNING: Failed to save key "stream.thiemo_sysnat_e9_v4-publish-1573137262tags" of type integer. {"key":"stream.thiemo_sysnat_e9_v4-publish-1573137262\u0000tags\u0000","exception":null}
The real problem is probably (?) that I'm trying to invalidateTags where the tag does not exist, but the warning message is not even close to telling me that.
How to reproduce
I'm using both doctrine ORM and doctrine ODM, and re-using the doctrine ORM cache pool to store ODM result cache manually
framework:
cache:
pools:
doctrine.result_cache_pool:
adapters:
- cache.adapter.array
- cache.adapter.apcu
- cache.adapter.redis
tags: true
At some point I invalidate tags, but it is possible that the tag has not been created
$this->doctrineResultCachePool->invalidateTags([
sprintf('%s-%s-%d', $code, $type, null), // latest version
sprintf('%s-%s-%d', $code, $type, $revision), // specific revision
]);
That's when this message shows up.
Interestingly enough I get 4 warnings, two for each tag. Perhaps the tag was in redis, but not in this pod?
Possible Solution
Improved warning message that I've tried to invalidate a tag that does not exist.