Skip to content

Commit

Permalink
adjust cache ttl
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtsam committed Dec 3, 2024
1 parent b0a759e commit 28d5558
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/utils/auth/providers/discord.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ export class DiscordProvider implements AuthProvider {
const result = await cachified({
key: `connection-info:discord:${providerId}`,
cache: longLivedCache,
ttl: 1000 * 60,
swr: 1000 * 60 * 60 * 24 * 7,
timing,
getFreshValue: async (context) => {
const response = await fetch(
Expand Down
2 changes: 2 additions & 0 deletions app/utils/auth/providers/github.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export class GitHubProvider implements AuthProvider {
const result = await cachified({
key: `connection-info:github:${providerId}`,
cache: longLivedCache,
ttl: 1000 * 60,
swr: 1000 * 60 * 60 * 24 * 7,
timing,
getFreshValue: async (context) => {
const response = await fetch(
Expand Down
2 changes: 2 additions & 0 deletions app/utils/mdx/compile-mdx.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ function cachedBundleMDX({
const compileMdx = cachified({
key,
cache: longLivedCache,
ttl: 1000 * 60 * 60 * 24 * 14,
swr: Infinity,
timing,
getFreshValue: () => queuedBundleMDX(bundle),
})
Expand Down

0 comments on commit 28d5558

Please sign in to comment.