getSourcePath()]; $cacheKey = DiscoveryCacheIdentifiers::fullDiscoveryKey($defaultPaths); $cachedItem = $cache->get($cacheKey); if ($cachedItem !== null && $cachedItem->value !== null) { echo "✅ Cache found\n"; $data = $cachedItem->value; echo "Cache Value Type: " . gettype($data) . "\n"; if (is_object($data)) { echo "Object Class: " . get_class($data) . "\n"; echo "Object Count: " . $data->count() . "\n"; } elseif (is_string($data)) { echo "String Length: " . strlen($data) . "\n"; echo "First 200 chars: " . substr($data, 0, 200) . "\n"; // Try to decode as JSON $decoded = json_decode($data, true); if (json_last_error() === JSON_ERROR_NONE) { echo "✅ Valid JSON detected\n"; echo "JSON Keys: " . implode(', ', array_keys($decoded)) . "\n"; } else { echo "❌ Not valid JSON\n"; } } elseif (is_array($data)) { echo "Array Keys: " . implode(', ', array_keys($data)) . "\n"; foreach ($data as $key => $value) { echo "\n--- $key ---\n"; echo "Type: " . gettype($value) . "\n"; if (is_array($value)) { echo "Array keys: " . implode(', ', array_keys($value)) . "\n"; if ($key === 'attributes' && isset($value['mappings'])) { echo "Mappings count: " . count($value['mappings']) . "\n"; echo "First 3 mappings keys: " . implode(', ', array_slice(array_keys($value['mappings']), 0, 3)) . "\n"; } if ($key === 'routes' && isset($value['routes'])) { echo "Routes count: " . count($value['routes']) . "\n"; } } } } } else { echo "❌ No cache found\n"; } echo "\nDone.\n";