fix cache dir

This commit is contained in:
SansGuidon 2025-05-24 23:50:44 +02:00
parent be66cf7e53
commit ea0c5c7765
2 changed files with 68 additions and 68 deletions

View File

@ -6,7 +6,7 @@ const path = require('path');
const BASE_URL = 'https://www.filmspourenfants.net';
// Setup disk cache
const CACHE_DIR = path.join(__dirname, '../cache');
const CACHE_DIR = process.env.CACHE_DIR || '/app/data/cache';
if (!fs.existsSync(CACHE_DIR)) fs.mkdirSync(CACHE_DIR, { recursive: true });
// Cache operations

View File

@ -5,7 +5,7 @@ const path = require('path');
const BASE_URL = 'https://www.filmstouspublics.fr';
// Setup disk cache
const CACHE_DIR = path.join(__dirname, '../cache');
const CACHE_DIR = process.env.CACHE_DIR || '/app/data/cache';
if (!fs.existsSync(CACHE_DIR)) fs.mkdirSync(CACHE_DIR, { recursive: true });
// Load cache from disk if available