Skip to content

Commit

Permalink
docs: add a warning about caching and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Aug 20, 2024
1 parent e254539 commit 5f7bffa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,21 @@ the program's secret values to local storage, which means they can be read by
program can start up immediately using cached data, even if the secrets server
is not reachable when it launches.

> [!WARNING]
> When you enable a cache for a program, new secret values may not immediately
> become available even if the program is restarted. By design, if a cached
> value is available at startup, the store does not wait for the secrets
> service to respond before delivering the initial (cached) value.
>
> The store will see the new value (and update the cache) the next time it
> successfully polls. If the program only looks at the initial value of the
> secret, however, it will not see the new value until it is restarted _after_
> the next update.
>
> As a general rule, we recommend you not a cache unless the program cannot
> tolerate any delay at startup. Otherwise, if you must use a cache, we advise
> you structure your program to automatically handle new secret values, and not
> to "lock in" the initial value of a secret when the program starts up.
## Self-Contained Operation

Expand Down

0 comments on commit 5f7bffa

Please sign in to comment.