Skip to content

Commit 1528a19

Browse files
authored
Merge pull request #258 from dotCMS/decrease-deprecation-ttl
Deprecation TTL: 60 min -> 15 min
2 parents 5807b21 + a203d66 commit 1528a19

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/docs/[slug]/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ export default async function Home({ searchParams, params }) {
273273
}
274274
}
275275

276-
// Fetch all deprecations once (uses 1hr cache)
276+
// Fetch all deprecations once (GraphQL response cached ~15m by default)
277277
let allDeprecations = null;
278278
try {
279279
allDeprecations = await getDeprecations();

services/docs/getDeprecations/getDeprecations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { TDeprecation } from './types';
66
type Options = { ttlSeconds?: number };
77

88
const getDeprecations = async (options: Options = {}): Promise<TDeprecation[] | null> => {
9-
const ttlSeconds = options.ttlSeconds ?? 3600; // 1 hour default
9+
const ttlSeconds = options.ttlSeconds ?? 900; // 15 minutes default
1010

1111
const query = `query Deprecations {
1212
DeprecationCollection(

0 commit comments

Comments
 (0)