GraphQLBundle icon indicating copy to clipboard operation
GraphQLBundle copied to clipboard

Caching responses

Open zserg84 opened this issue 4 years ago • 1 comments

Q A
Bug report? no
Feature request? yes
BC Break report? no
Version/Branch 0.13.2
--

Hi guys. I have endpoints whose results rarely change. And I would like to cache this results so as not to torment the database with every query. Is this possible in the current implementation?

zserg84 avatar Jun 30 '20 06:06 zserg84

Hey @zserg84 ! At the moment, there is no built-in cache system. It shouldn't be to hard to implement with events I think. Check this page : https://github.com/overblog/GraphQLBundle/blob/master/docs/events/index.md By hooking into the pre execute to check the cache and in the post to actually cache the result for later.

Vincz avatar Jul 06 '20 09:07 Vincz