Skip to content

Commit e800552

Browse files
committed
adding cache hit note
1 parent 17b7971 commit e800552

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ res.setHeader('cache-control', 'private, no-cache, max-age=300')
100100
res.setHeader('etag', '1')
101101
```
102102
This will enable browser clients to keep a copy of the cache on their side, but still being forced to validate
103-
the cache state on the server before using the cached response, therefore supporting gateway based cache invalidation.
103+
the cache state on the server before using the cached response, therefore supporting gateway based cache invalidation.
104+
105+
> NOTE: In order to fetch the generated `Cache-Control` and `ETag` headers, there have to be at least cache hit.
104106
105107
### Invalidating caches
106108
Services can easily expire cache entries on demand, i.e: when the data state changes. Here we use the `x-cache-expire` header to indicate the cache entries to expire using a matching pattern:

0 commit comments

Comments
 (0)