8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symfony version(s) affected: 4.4.11
Description TagAwareAdapter::invalidateTags() was not working when it was wrapped ArrayAdapter.
How to reproduce
public function testInvalidateTagsByTagAwareAdapterWrappedArrayAdapter() { $cache = new TagAwareAdapter(new ArrayAdapter()); $item = $cache->getItem('foo'); $item->set(1); $item->tag('bar'); $cache->save($item); $this->assertSame(1, $cache->getItem('foo')->get()); $this->assertSame(true, $cache->invalidateTags(['bar'])); $this->assertSame(null, $cache->getItem('foo')->get()); // This code should be pass, but failed. }
Possible Solution I think that the cause of this issue is due to the following factors:
So i think possible solution is ArrayAdaputer::save() treat expiry = 0 as indefinite.
The text was updated successfully, but these errors were encountered:
Thanks for the report. I'm closing as duplicate of #37667, fixed in #37671, to be released soon.
Sorry, something went wrong.
No branches or pull requests
Symfony version(s) affected: 4.4.11
Description
TagAwareAdapter::invalidateTags() was not working when it was wrapped ArrayAdapter.
How to reproduce
Possible Solution
I think that the cause of this issue is due to the following factors:
line 127: if (null !== $expiry && $expiry <= microtime(true)) {
line 140: $this->expiries[$key] = null !== $expiry ? $expiry : PHP_INT_MAX;
So i think possible solution is ArrayAdaputer::save() treat expiry = 0 as indefinite.
The text was updated successfully, but these errors were encountered: