Skip to content

Commit 365615e

Browse files
committed
feat: Update caching docs
1 parent df7f80c commit 365615e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Guides/Caching.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ By default we cache the results of each request you make for **1 hour**. If you
66

77
The cache is shared across all users. If two users run a query with the same requests—even with different auth tokens—the cached results are still returned.
88

9-
- **Example**: If you send a query such as `/api/v1/episodes?episode_num=1` and a second query string with `/api/v1/episodes?episode_num=2`, the API will pick up that these are different and will _create a cache for each one_.
9+
- **Example¹**: If you request such as `/api/v1/episodes?duration=>3000000` and a second request with `/api/v1/episodes?duration=>3000000`, the API will define as **equals** and will _return the cached data_.
10+
- **Example²**: If you request such as `/api/v1/episodes?episode_num=1` and a second request with `/api/v1/episodes?episode_num=2`, the API will define as **different** and will _create a cache for each one_.
11+
12+
!!!Note
13+
The cache will be invalidated after **1 hour of inactivity**
14+
!!!
1015

1116
You can identify if a result has been cached by checking the `ETag` header on the API response.
1217

0 commit comments

Comments
 (0)