Skip to content

Commit dae58b2

Browse files
Merge pull request #314 from Portkey-AI/cache-ttl
cache TTL page update
2 parents b36ed7a + 80b6370 commit dae58b2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

product/ai-gateway/cache-simple-and-semantic.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,32 @@ In this example, your cache will automatically expire after 60 seconds. Cache ag
9595
</Info>
9696
---
9797
98+
99+
## Organization-Level Cache TTL Settings
100+
101+
Organization administrators can now define the default cache TTL (Time to Live) for all API keys and workspaces within the organization. This provides centralized control over cache expiration to align with data retention policies.
102+
103+
**How to Configure Organization Cache TTL**
104+
1. Navigate to Admin Settings
105+
2. Select Organization Properties
106+
3. Scroll to Cache Settings
107+
4. Enter your desired default cache TTL value (in seconds)
108+
5. Click Save
109+
110+
### How Organization-Level Cache TTL Works
111+
112+
1. **Default Value**: The value set at the organization level serves as both the maximum and default TTL value.
113+
2. **Precedence Rules**:
114+
- If no `max_age` is specified in the request, the organization-level default value is used.
115+
- If the `max_age` value in a request is greater than the organization-level default, the organization-level value takes precedence.
116+
- If the `max_age` in a request is less than the organization-level default, the lower request value is honored.
117+
3. The max value of Organisation Level Cache TTL is 25923000 seconds.
118+
<Info>
119+
This feature helps organizations implement consistent cache retention policies while still allowing individual requests to use shorter TTL values when needed.
120+
</Info>
121+
122+
123+
98124
## Force Refresh Cache
99125
100126
Ensure that a new response is fetched and stored in the cache even when there is an existing cached response for your request. Cache force refresh can only be done **at the time of making a request**, and it is **not a part of your Config**.

0 commit comments

Comments
 (0)