From a28058d68c02b23da275fdd8582da631c332766b Mon Sep 17 00:00:00 2001 From: Lucas Rayan Date: Sun, 9 Nov 2025 18:29:04 -0300 Subject: [PATCH] fix: update cache configuration and enable caching in Google Sheets API route --- app/api/placas/route.js | 9 +++++---- package.json | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/api/placas/route.js b/app/api/placas/route.js index 0c327f1..39cf59b 100644 --- a/app/api/placas/route.js +++ b/app/api/placas/route.js @@ -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 { diff --git a/package.json b/package.json index 8dc9be6..5954f97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "esp32", - "version": "0.1.0", + "name": "espdocs", + "version": "1.0.0", "private": true, "scripts": { "dev": "next dev --turbopack",