relay-tools / react-relay-network-modern

Relay Modern Network Layer with middlewares — cache, auth, retry, batch, logger, SSR
MIT License
327 stars 62 forks source link

Add `updateTTLOnGet` argument to cache middleware #132

Closed dr3 closed 3 years ago

dr3 commented 3 years ago

Change

Add updateTTLOnGet argument to cache middleware to reset the TTL on cache payloads when fetched from cache

Why?

It is sometimes desired to keep items in cache for extended periods of time, longer than the typical TTL without refetching them after the first fetch.

cc @nodkz

nodkz commented 3 years ago

Looks good. 👍 Thanks!

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 6.1.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: