Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit 89209ce

Browse files
authored
docs: Clarify that timeout applies to unset
1 parent d569a05 commit 89209ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ The two important ones are `freshFor` and `expire`:
169169
* `expire` is the time in seconds after which a value should be deleted from the cache (or whatever expiring natively means for the backend). Usually you'd want this to be `0` (never expire).
170170
* `freshFor` is the time in seconds after which a value should be replaced. Replacing the value is done in the background and while the new value is generated (e.g. data is fetched from some service) the stale value is returned. Think of `freshFor` as a smarter `expire`.
171171
* `timeout` is the maximum time in milliseconds to wait for cache operations to complete.
172-
Configuring a timeout ensures that all `get` and `set` operations fail fast.
172+
Configuring a timeout ensures that all `get`, `set`, and `unset` operations fail fast.
173173
Otherwise there will be situations where one of the cache hosts goes down and reads hang for minutes while the memcached client retries to establish a connection.
174174
It's **highly** recommended to set a timeout.
175175
If `timeout` is left `undefined`, no timeout will be set and the operations will only fail once the underlying client, e.g. [`memcached`](https://github.com/3rd-Eden/memcached), gave up.

0 commit comments

Comments
 (0)