Replies: 3 comments 2 replies
-
you can use custom replacer in config/responsecache.php 'replacers' => [ // example class ReplacerCache to handle session reset with replace string your code session code |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm also having this issue. Did you find a solution @rrdirnens? |
Beta Was this translation helpful? Give feedback.
2 replies
-
A Simple workaround is a custom Middleware that extend the Cache Middleware <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Spatie\ResponseCache\Middlewares\CacheResponse;
use Symfony\Component\HttpFoundation\Response;
class CheckQueryForCaching extends CacheResponse
{
public function handle(Request $request, Closure $next, ...$args): Response
{
if ($request->getQueryString()) {
return $next($request);
}
return parent::handle($request, $next, $args);
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The title, pretty much.
Laravel has the option to redirect with flashed session data, but this also gets cached. Is there a way to avoid this?
Beta Was this translation helpful? Give feedback.
All reactions