update cache expiry for demo purposes

This commit is contained in:
akcodez
2024-08-27 08:31:40 -07:00
parent fbf97c74a1
commit da63775f3e
2 changed files with 2 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ export default async function getServerProps(route: PageRouteDetails, data: { pr
try {
if (cache.expiresAt <= Date.now()) {
cache.response = await fetchGql(GET_EVENTS);
cache.expiresAt = Date.now() + 1000 * 60 * 5; // 5 minutes naive cache
cache.expiresAt = Date.now() + 1000 * 60 * 1; // 5 minutes naive cache
}
} catch (e) {
console.error('Failed to fetch events', e);

View File

@@ -42,7 +42,7 @@ export default async function getServerProps(route: PageRouteDetails, data: { pr
try {
if (cache.expiresAt <= Date.now()) {
cache.response = await fetchGql(GET_EVENTS);
cache.expiresAt = Date.now() + 1000 * 60 * 5; // 5 minutes naive cache
cache.expiresAt = Date.now() + 1000 * 60 * 1; // 5 minutes naive cache
}
} catch (e) {
console.error('Failed to fetch events', e);