Skip to content

Invalidate tags not working #27306

New issue

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

Closed
pawellewandowski opened this issue May 18, 2018 · 1 comment
Closed

Invalidate tags not working #27306

pawellewandowski opened this issue May 18, 2018 · 1 comment

Comments

@pawellewandowski
Copy link

Symfony version(s) affected: 3.4.9

Description
Cache don't invalidate tags. In version 3.4.8 everything working fine.

How to reproduce

        $cache = new TagAwareAdapter(
            new FilesystemAdapter(),
            new FilesystemAdapter()
        );

        $review = $cache->getItem('reviews-1');
        $review->set('test');
        $review->tag(['reviews']);
        $cache->save($review);
        dump($cache->getItem('reviews-1')->isHit()); //true - correct

        $cache->invalidateTags(['reviews']);

        dump($cache->getItem('reviews-1')->isHit()); //false - correct

        $cache = new TagAwareAdapter(
            new FilesystemAdapter(),
            new FilesystemAdapter()
        );
        $review = $cache->getItem('reviews-1');
        dump($cache->getItem('reviews-1')->isHit()); //true - incorrect / why ?

Probably error in GH-27007

@xabbuh
Copy link
Member

xabbuh commented May 18, 2018

This looks like a duplicate of #27147 which was fixed in #27158 and will be part of Symfony 3.4.10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants