feat: Implement ETag-based conditional caching for API and HTML, add immutable caching for images, and introduce concurrency control with resizing for picture syncing.

This commit is contained in:
sebseb7
2025-11-23 10:51:16 +01:00
parent 3f451dde06
commit 49246169db
4 changed files with 127 additions and 19 deletions

View File

@@ -61,12 +61,11 @@ class CategorySyncer extends EventEmitter {
try {
await this._syncFromDb();
const duration = Date.now() - startTime;
console.log(`✅ Sync completed successfully in ${duration}ms.`);
// Log next sync time
// Log completion and next sync time
const syncInterval = parseInt(process.env.SYNC_INTERVAL_MS) || 60000;
const minutes = Math.round(syncInterval / 60000);
console.log(` Next sync in ${minutes} minute${minutes !== 1 ? 's' : ''}`);
console.log(`✅ Sync completed in ${duration}ms. Next sync in ${minutes} minute${minutes !== 1 ? 's' : ''}`);
} catch (err) {
console.error('❌ Sync failed:', err);
} finally {