fix: update cache configuration and enable caching in Google Sheets API route
This commit is contained in:
1 parent
b89dd3e880
commit
a28058d68c
2 files changed
+7
-6
No files matched your search
@@ -1,11 +1,12 @@
|
||||
import { google } from 'googleapis';
|
||||
import { NextResponse } from 'next/server';
|
||||
|
||||
// Habilitar/desabilitar cache
|
||||
const ENABLE_CACHE = false;
|
||||
|
||||
// Configurar cache de 1 hora (se habilitado)
|
||||
export const revalidate = ENABLE_CACHE ? 3600 : 0;
|
||||
// Configurar cache de 1 hora (sempre exportar um número, 0 = sem cache)
|
||||
export const revalidate = 3600;
|
||||
|
||||
// Habilitar/desabilitar cache
|
||||
const ENABLE_CACHE = revalidate > 0;
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user