Skip to content

Missing flushed cache event on Illuminate\Cache\TaggableStore #55101

@cesarreyes3

Description

@cesarreyes3

Laravel Version

12

PHP Version

8.3

Database Driver & Version

MariaDB

Description

I'm capturing cache events, and everything's fine, but I notice no events are captured when flushing/clearing the cache. Is this intentional? It would be great to have that event available from Laravel.


12.x/src/Illuminate/Cache/Events

  • CacheHit
  • CacheMissed
  • ForgettingKey
  • KeyForgetFailed
  • KeyForgotten
  • KeyWriteFailed
  • KeyWritten
  • RetrievingKey
  • RetrievingManyKeys
  • WritingKey
  • WritingManyKeys

public function clear(): bool
{
return $this->store->flush();
}

public function flush()
{
return $this->memcached->flush();
}

Steps To Reproduce

$cache->tags(['tag_key'])->remember( // event dispatched
$cache->tags(['tag_key'])->forget(   // event dispatched
$cache->tags(['tag_key'])->flush();  // no event dispatched but it works 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions