def dispatch(self, request, *args, **kwargs):
if not graphql_api_settings.CACHE_ACTIVE:<EOL><INDENT>return self.super_call(request, *args, **kwargs)<EOL><DEDENT>cache = caches["<STR_LIT:default>"]<EOL>operation_ast = self.get_operation_ast(request)<EOL>if operation_ast and operation_ast.operation == "<STR_LIT>":<EOL><INDENT>cache.clear()<EOL>return self.super_call(request, *args, **kwargs)<EOL><DEDENT>cache_key = "<STR_LIT>".format(self.fetch_cache_key(request))<EOL>response = cache.get(cache_key)<EOL>if not response:<EOL><INDENT>response = self.super_call(request, *args, **kwargs)<EOL>cache.set(cache_key, response, timeout=graphql_api_settings.CACHE_TIMEOUT)<EOL><DEDENT>return response<EOL>
Fetches queried data from graphql and returns cached & hashed key.