cloudcreativity / json-api

Framework agnostic JSON API serialisation and deserialisation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the place where I can save the result of any query

baderAmmoun opened this issue · comments

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

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/

Actually closing this as I see you've opened an issue in the laravel-json-api package which is where this should be!