bootstrapWeb(); $endTime = microtime(true); $duration = ($endTime - $startTime) * 1000; echo " ✅ Bootstrap completed in " . number_format($duration, 2) . "ms\n"; // Check if this was a cache hit or miss if ($duration < 100) { echo " 🚀 CACHE HIT - Fast bootstrap!\n"; } elseif ($duration < 500) { echo " ⚡ PARTIAL CACHE - Some components cached\n"; } else { echo " 🐌 CACHE MISS - Full bootstrap performed\n"; } // Force cleanup unset($bootstrapper, $application, $performanceCollector, $memoryMonitor); if (function_exists('gc_collect_cycles')) { gc_collect_cycles(); } } catch (Exception $e) { echo " ❌ Error: " . $e->getMessage() . "\n"; } echo "\n"; } // Check cache state echo "Cache Analysis:\n"; try { // Try to access Redis directly to see what's cached $redis = new Redis(); $redis->connect('redis', 6379); $redis->select(1); // Cache DB $cacheKeys = $redis->keys('cache:discovery:*'); echo " Discovery cache keys: " . count($cacheKeys) . "\n"; foreach ($cacheKeys as $key) { $ttl = $redis->ttl($key); $size = strlen($redis->get($key)); echo " - $key (TTL: {$ttl}s, Size: " . number_format($size) . " bytes)\n"; } if (empty($cacheKeys)) { echo " ⚠️ NO DISCOVERY CACHE KEYS FOUND!\n"; echo " This means discovery results are NOT being cached.\n"; } } catch (Exception $e) { echo " ❌ Could not check Redis cache: " . $e->getMessage() . "\n"; }