fix: aggiorna urgenza lista spesa live e più frequentemente
- Cache smart_shopping: 10min → 3min (urgenza fresca) - backgroundBringSync: ogni 10min → ogni 5min + setInterval continuo - backgroundBringSync: aggiunge anche 'high' (non solo 'critical') a Bring - autoSyncUrgencySpecs: aggiorna spec anche se il livello di urgenza sale/scende - Risultato: Latte/prodotti urgenti compaiono su Bring in max ~5min
This commit is contained in:
+1
-1
@@ -3044,7 +3044,7 @@ function invalidateSmartShoppingCache(): void {
|
||||
|
||||
function smartShoppingCached(PDO $db): void {
|
||||
$cacheFile = __DIR__ . '/../data/smart_shopping_cache.json';
|
||||
$maxAge = 10 * 60; // 10 minutes
|
||||
$maxAge = 3 * 60; // 3 minutes — keep urgency fresh
|
||||
|
||||
if (file_exists($cacheFile)) {
|
||||
$mtime = filemtime($cacheFile);
|
||||
|
||||
Reference in New Issue
Block a user