reduce cache maxage
This commit is contained in:
parent
2686197b4a
commit
03163e9d32
5 changed files with 5 additions and 5 deletions
|
@ -9,7 +9,7 @@ const HomeCrumb = () => {
|
|||
|
||||
return (
|
||||
<Link href="/">
|
||||
<a>
|
||||
<a className="flex items-center">
|
||||
<FontAwesomeIcon className="h-3 w-3" icon={['far', 'flag']} />
|
||||
<span className="ml-2 font-medium">{t('Home')}</span>
|
||||
</a>
|
||||
|
|
|
@ -133,7 +133,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
|
||||
// Set edge function caching for faster load times, check docs:
|
||||
// https://vercel.com/docs/concepts/functions/edge-caching
|
||||
res.setHeader('Cache-Control', 'max-age=60, s-maxage=3600, stale-while-revalidate')
|
||||
res.setHeader('Cache-Control', 'max-age=0, s-maxage=600, stale-while-revalidate')
|
||||
|
||||
// Sometimes the path parameter is defaulted to '[...path]' which we need to handle
|
||||
if (path === '[...path]') {
|
||||
|
|
|
@ -13,7 +13,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
|
||||
// Set edge function caching for faster load times, check docs:
|
||||
// https://vercel.com/docs/concepts/functions/edge-caching
|
||||
res.setHeader('Cache-Control', 'max-age=60, s-maxage=3600, stale-while-revalidate')
|
||||
res.setHeader('Cache-Control', 'max-age=0, s-maxage=600, stale-while-revalidate')
|
||||
|
||||
if (typeof id === 'string') {
|
||||
const itemApi = `${apiConfig.driveApi}/items/${id}`
|
||||
|
|
|
@ -34,7 +34,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
|
||||
// Set edge function caching for faster load times, check docs:
|
||||
// https://vercel.com/docs/concepts/functions/edge-caching
|
||||
res.setHeader('Cache-Control', 'max-age=60, s-maxage=3600, stale-while-revalidate')
|
||||
res.setHeader('Cache-Control', 'max-age=0, s-maxage=600, stale-while-revalidate')
|
||||
|
||||
if (typeof searchQuery === 'string') {
|
||||
// Construct Microsoft Graph Search API URL, and perform search only under the base directory
|
||||
|
|
|
@ -17,7 +17,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||
|
||||
// Set edge function caching for faster load times, check docs:
|
||||
// https://vercel.com/docs/concepts/functions/edge-caching
|
||||
res.setHeader('Cache-Control', 'max-age=60, s-maxage=3600, stale-while-revalidate')
|
||||
res.setHeader('Cache-Control', 'max-age=0, s-maxage=600, stale-while-revalidate')
|
||||
|
||||
// Check whether the size is valid - must be one of 'large', 'medium', or 'small'
|
||||
if (size !== 'large' && size !== 'medium' && size !== 'small') {
|
||||
|
|
Loading…
Reference in a new issue