You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
I recently upgraded my Laravel project from v9 to v11, which required updating this package to the latest compatible version, v12.0.2. I also tested v0.13.0 on Laravel 10 and encountered the same issue.
The problem is that while the package successfully writes data into Redis, it does not update the cache when a model is updated or deleted. The changes are only reflected after running:
php artisan cache:clear
Steps to Reproduce:
Update a model record using Eloquent.
Check Redis – the old data remains.
Delete a model record.
Check Redis – the deleted data still exists.
Run php artisan cache:clear, and only then does the cache update properly.
Expected Behavior:
The cache should automatically refresh when a model is updated or deleted, without requiring a manual cache:clear.
Environment Details:
Laravel Version: 11.x (also tested on 10.x)
Package Version: v12.0.2 (also tested on 0.13.0 with Laravel 10)
Cache Driver: Redis
Any guidance or fixes would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
Hi @mattscicluna2 please provide an example of your model and the query being ran. It sounds like the model doesn't have the Cachable trait or the query method is not supported. I'm moving this to a discussion for now until we can drill further into this and positively identify it as a bug.
Repository owner
locked and limited conversation to collaborators
Mar 12, 2025
Description:
I recently upgraded my Laravel project from v9 to v11, which required updating this package to the latest compatible version, v12.0.2. I also tested v0.13.0 on Laravel 10 and encountered the same issue.
The problem is that while the package successfully writes data into Redis, it does not update the cache when a model is updated or deleted. The changes are only reflected after running:
php artisan cache:clear
Steps to Reproduce:
Update a model record using Eloquent.
Check Redis – the old data remains.
Delete a model record.
Check Redis – the deleted data still exists.
Run php artisan cache:clear, and only then does the cache update properly.
Expected Behavior:
The cache should automatically refresh when a model is updated or deleted, without requiring a manual cache:clear.
Environment Details:
Laravel Version: 11.x (also tested on 10.x)
Package Version: v12.0.2 (also tested on 0.13.0 with Laravel 10)
Cache Driver: Redis
Any guidance or fixes would be greatly appreciated!
The text was updated successfully, but these errors were encountered: