Closed adis0308 closed 2 years ago
Hello curious contributor ! Since it seems to be your first contribution, make sure that you've been:
Hello,
Hmm weird, I will made some tests tonight, I'm surprised this case is not covered by tests.
Cheers, Georges
Hello,
I made some tests (on Files driver) and I'm unable to reproduce the bug:
Also I'm able to recover the second cache item by its tag after the first one being deleted:
Please reopen this issue. I have tried version 8.1.2 and it doesn't solve the problem. I am using Redis cache and the problem is not solved. If I add more alternative tags then the 'global' tag like in the example will be deleted automatically again.
I can't reproduce it, I made deep tests, the CI passe too with multiple tags tests, I can't reproduce it π€·π»ββοΈ
Redis tests with tags on v8 3 days ago: https://app.travis-ci.com/github/PHPSocialNetwork/phpfastcache/jobs/565989218#L5485
Due to the fact that I'm unable to reproduce this bug, confirmed by deep tests, I'm reclosing it again, until you provide me a strong proof with code and screenshoot/video if needed.
Thanks.
Configuration
Describe the bug Tags that have an expiration date are always deleted even though one of the items still exists.
Expected behavior I want the Tag to not be deleted if the Item in the tag still exists.
Code Example $cache = $InstanceCache->getItem('item'); $cache->set('cache data here')->expiresAfter(60); $cache->addTags(['global', 'tag1']);
$cache = $InstanceCache->getItem('another item'); $cache->set('another cache data here')->expiresAfter(1314000); $cache->addTags(['global', 'tag 2']);
In the example code above it produces If the "item" cache expires then the "global" and "tag 1" tags will be deleted. The "global" tag should not be deleted because it still has cache "another item" with tag "tag 2"