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
I have implemented the latest version 0.3.0 package in laravel 5.2.X and normal pages working fine , but none of the ajax requests are working after implementing this.
When i comment this line in Kernal 'Barryvdh\HttpCache\Middleware\CacheRequests', ajax works but no cache is then generated in the storage. Please help me on this.
the below steps i did
in Kernal
protected $middleware = [
...all existing lines////
'Barryvdh\HttpCache\Middleware\CacheRequests',
];
for me it was related to clearing the cache when user is logged-in/ logged-out / register as atm the http cache doesnt support user contexts without a 3rd party package. #42
but sometimes you would still get an error about the csrf, and the solution would be adding the 'Barryvdh\HttpCache\Middleware\CacheRequests' at the end of web group
This i have already tried but that time i didn't cleared cache, will give a try after clearing the cache after placing the above line in web middleware group
Hi,
I have implemented the latest version 0.3.0 package in laravel 5.2.X and normal pages working fine , but none of the ajax requests are working after implementing this.
When i comment this line in Kernal 'Barryvdh\HttpCache\Middleware\CacheRequests', ajax works but no cache is then generated in the storage. Please help me on this.
the below steps i did
in Kernal
protected $middleware = [
...all existing lines////
'Barryvdh\HttpCache\Middleware\CacheRequests',
];
protected $routeMiddleware = [
......all existing lines////
'ttl' => \Barryvdh\HttpCache\Middleware\SetTtl::class,
];
then in app.php i have added 'Barryvdh\HttpCache\ServiceProvider',
then in my routes i did like below because i need in only few pages
Route::get('/mypage', [
'middleware' => 'ttl:86400', 'uses' => 'MyController@mymethod'
]);
The text was updated successfully, but these errors were encountered: