Caching
The GraphQL API server provided by@subsquid/graphql-server supports caching via additional flags. It is done on a per-query basis. The whole response is cached for a specified amount of time (maxAge).
To enable caching when deploying to SQD Cloud, add the caching flags to the serve:prod command definition at commands.json, then use that command to run the server in the deployment manifest. Cloud currently supports only in-memory cache.
For example, snippets below will deploy a GraphQL API server with a 100Mb in-memory cache and invalidation time of 5 seconds:
commands.json
squid.yaml
npx squid-graphql-server --help. Here are some more details on them:
--dumb-cache <cache-type>
Enables cache, either in-memory or redis. For redis, a Redis connection string must be set by a variable REDIS_URL. SQD Cloud deployments currently support only in-memory cache.

