jeudi 29 septembre 2016

Laravel ResponseCache caches variables incorrectly

I am using the Spatie\ResponseCache to cache all responses in the frontend of my application. Sometimes I do need to parse some variable in the URL, like for search and pagination.

A URL like 127.0.0.1/publications will be cached and when I access 127.0.0.1/publications?start=20 it will show the cached page as per first URL.

How do I bypass this? I do not want to hard code it in the routes, like Route::get('/publications', ['middleware' => 'doNotCacheResponse', 'uses' => 'PagesController@content']) as /publications can be changed in the database.

Any help would be much appreciated



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire