Closed ardulogic closed 3 years ago
It is a specifics of a packages used in this package. This package is only a wrapper around Laravel and http://www.php-cache.com/ and I actually have no relation to any of those. It also seems like it is not a bug. Try
Cache::tags(['tag1', 'tag2'])->put('test1', 'test1');
Cache::tags(['tag1', 'tag2'])->put('test1', 'test2');
Cache::tags(['tag1', 'tag2'])->put('test1', 'test3');
Cache::tags(['tag1', 'tag2'])->put('test1', 'test4');
And then next calls will all return test4
:
Cache::tags(['tag1', 'tag2'])->get('test1');
Cache::tags(['tag2', 'tag1'])->get('test1');
Cache::tags(['tag1'])->get('test1');
Cache::tags(['tag2'])->get('test1');
Cache::get('test1');
I don't see any specific requirements for tags management in http://www.php-cache.com/en/latest/#tagging docs so it is actually working the way developers of php-cache packages designed. It might be that management of 'clean' version of tagging is more taxing than 'dirty' one. As far as I know http://www.php-cache.com/ cache drivers are all quite popular and well maintained.
Steps to reproduce:
Clear your redis database and run this code:
You will see two main lists for each tag, which seems correct:
But within each list, entries are duplicating:
This shouldn`t happen since the keys are the same.