the place where I can save the result of any query
baderAmmoun opened this issue · comments
baderAmmoun commented
I'm trying to save the result of any query inside the key in the cache and add middle ware where I can check if
the key already exist inside the cache and if it is return it otherwise go further to the api
Christopher Gammie commented
Hi! This kind of caching approach is best done in middleware. you want to save the HTML response against a key in the cache that is generated from the HTML request.
Adding your own middleware is documented here:
https://laravel-json-api.readthedocs.io/en/latest/basics/routing/
Christopher Gammie commented
Actually closing this as I see you've opened an issue in the laravel-json-api
package which is where this should be!