From 9910bb1d459cec507f3072cdf8534bdd16dab6d8 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Thu, 15 Feb 2024 09:31:49 +0000 Subject: [PATCH] Update documentation. --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 9616dca..41297ca 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,17 @@ For example, `query MyCachedQuery @cached(ttl: 90) ....` will set the cache for You can also set cache for specific query by using `X-Cache-Graphql-Query` header, which will set the cache for the query to the provided time, for example `X-Cache-Graphql-Query: 90` will set the cache for the query to 90 seconds. +You can also force refresh of the cache by using `@cached(refresh: true)` directive in the query, for example: + +``` +query MyProducts @cached(refresh: true) { + products { + id + name + } +} +``` + Since version `0.5.30` the cache is gzipped in the memory, which should optimise the memory usage quite significantly. ### Security