Skip to content

Commit

Permalink
fix: decrease cache max age for denied resources
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Jul 13, 2023
1 parent 3765573 commit d3ba59a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/denylist/src/denylist.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import { getFromDenyList } from './utils/denylist'
import { JSONResponse } from '@web3-storage/worker-utils/response'

/** Time in seconds to cache the response when it IS NOT on the deny list */
const CACHE_TIME_RESOURCE_ALLOWED = 120 // 1 hour
const CACHE_TIME_RESOURCE_ALLOWED = 60 * 5 // 2 minutes
/** Time in seconds to cache the response when it IS on the deny list */
const CACHE_TIME_RESOURCE_DENIED = 60 * 60 * 24 // 1 day (we don't usually un-deny)
const CACHE_TIME_RESOURCE_DENIED = 60 * 10 // 10 minutes

/**
* Returns badbits denylist results.
Expand Down

0 comments on commit d3ba59a

Please sign in to comment.