Skip to content

Redis Cache Tags unable to flush #47903

@jhemmmm

Description

@jhemmmm

Laravel Version

10.16.1

PHP Version

8.2.8

Database Driver & Version

mysql Ver 15.1 Distrib 10.7.8-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper

Description

Hello,

In production, the

Cache::tags('TAGS')->flush();

It only works after a few days and then stopped working completely.

Cache::tags('TAGS')->get(cache_key(['TAGS' => true, 'PAGE' => 1, 'SORT' => 'newest']));
= Illuminate\Pagination\LengthAwarePaginator {#7281
    +onEachSide: 3,
  }

> Cache::tags('TAGS')->flush();
= true

> Cache::tags('TAGS')->get(cache_key(['TAGS' => true, 'PAGE' => 1, 'SORT' => 'newest']));
= Illuminate\Pagination\LengthAwarePaginator {#8029
    +onEachSide: 3,
  }

> Cache::tags('TAGS')->forget(cache_key(['TAGS' => true, 'PAGE' => 1, 'SORT' => 'newest']));
= true

> Cache::tags('TAGS')->get(cache_key(['TAGS' => true, 'PAGE' => 1, 'SORT' => 'newest']));
= null

I was under the expression that it could be the flush function that isn't working so I tried doing the forget function, as expected, it works just fine, but the flush isn't working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions