Skip to content

Commit

Permalink
docs: In-memory cache note (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
calvincestari authored Apr 10, 2024
1 parent c611181 commit eae69a0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/source/caching/cache-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ A few examples of this are:

For data that is short-lived, the simplicity of having a clear cache at the beginning of each application run, combined with the improved performance, may make an `InMemoryNormalizedCache` a good choice.

<Note>

`InMemoryNormalizedCache` **does not** implement any auto-eviction policies. This means your application is responsible for reacting to any low memory notifications and taking action to either clear the cache or remove select records.

</Note>

### Setup

To use an `InMemoryNormalizedCache`, no additional work is necessary!
Expand Down Expand Up @@ -56,9 +62,11 @@ A few examples of this are:

For data that you want to persist between application runs, the `SQLiteNormalizedCache` may fit your needs.

> **Note: Caching Sensitive Data**
>
> When persisting cache data to disk, be sure to consider if any sensitive data is being written to the cache. Cache data is stored in plain-text and can be retrieved from the device. You may need to sanitize your cache data or encrypt the cache file.
<Note>

When persisting cache data to disk, be sure to consider if any sensitive data is being written to the cache. Cache data is stored in plain-text and can be retrieved from the device. You may need to sanitize your cache data or encrypt the cache file.

</Note>

### Setup

Expand Down

0 comments on commit eae69a0

Please sign in to comment.