Cache virtually generated json

I’m using route for generating json api. Is it possible cache this generated json file until the panel update? I’m using return response::json();

Thanks

Yes, it should be possible using the Toolkit’s cache class to set up the cache and clear the cache using hooks.

Do you know about some snippets or tutorial (like Kirby cookbook) where I can start?
I’m not a developer.

Thanks

Have a look at how this archived plugin handles this: https://github.com/distantnative/embed/tree/master/core/lib

I’m not aware of a recipe.

I’ve also found this old plugin: https://github.com/samnabi/getcached

Thanks a lot. getCached helps me solve my problem…