mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Increase list cache time to 6 hours
This commit is contained in:
parent
a02865ddf6
commit
ef2159602f
1 changed files with 4 additions and 3 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
import { getNetlifyRedirect } from '~/helpers/config-node.js'
|
import { getNetlifyRedirect } from '~/helpers/config-node.js'
|
||||||
|
|
||||||
|
|
||||||
const ONE_HOUR = 60 * 60
|
|
||||||
const ONE_SECOND = 1
|
const ONE_SECOND = 1
|
||||||
|
const ONE_HOUR = 60 * 60
|
||||||
|
const TWELVE_HOURS = 12 * ONE_HOUR
|
||||||
|
|
||||||
function trimTrailingSlash ( url ) {
|
function trimTrailingSlash ( url ) {
|
||||||
return url.replace( /\/$/, '' )
|
return url.replace( /\/$/, '' )
|
||||||
|
|
@ -24,12 +25,12 @@ function getMaxAgeForUrl ( Astro ) {
|
||||||
|
|
||||||
// Top level list pages
|
// Top level list pages
|
||||||
if ( topLevelListPages.has( urlPath ) ) {
|
if ( topLevelListPages.has( urlPath ) ) {
|
||||||
return ONE_HOUR
|
return TWELVE_HOURS
|
||||||
}
|
}
|
||||||
|
|
||||||
// Kind page
|
// Kind page
|
||||||
if ( requestUrl.pathname.startsWith( '/kind/' ) ) {
|
if ( requestUrl.pathname.startsWith( '/kind/' ) ) {
|
||||||
return ONE_HOUR
|
return TWELVE_HOURS
|
||||||
}
|
}
|
||||||
|
|
||||||
return ONE_SECOND
|
return ONE_SECOND
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue