Replies: 2 comments
-
Hi, i have the same probleme but it dont work with :
have you find another solution ? |
Beta Was this translation helpful? Give feedback.
-
hi, to solve this problem you can change hasher in config/responsecache.php to your own
At least in my case the cache is shared by all users also the route function with the argument I also tried using tags, but it seems that with my version of redis and Laravel the flush function does not work (laravel 10, redis 7.4.0),
After calling |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have an issue on my side I can't wrap my head around.
I used the middleware on the following route
Route::get('/post/{slug}', [BlogController::class, 'showPost'])->middleware('cacheResponse')->name('blog.showpost');
It works well, the response is cached when I hit http://mywebsite.com/post/example
Then, when I want to forget the cache for a specific URL, I'll call this function
But this code does not forget the URL with the specified slug ("example" as per my previous example) ... (it works well with ResponseCache::clear(); but I don't want to wipe everything)
The slug is obviously the same. I'm sure I'm missing something obvious but I don't understand what at this moment.
Any help would be appreciated ! Thanks a lot !
EDIT : it WORKS when I return an empty string in useCacheNameSuffix but I thought selectCachedItems was the way to get around the suffix ?
Beta Was this translation helpful? Give feedback.
All reactions