Deploy: 2026-05-23 00:24:51

This commit is contained in:
Hamza-Ayed
2026-05-23 00:24:52 +03:00
parent 408b4b0048
commit 0e16fd3f5d
3 changed files with 39 additions and 4 deletions

View File

@@ -61,6 +61,23 @@ if (class_exists('\Redis')) {
} else {
echo " ❌ Failed to get correct value from Redis.\n";
}
// Verify prefixing using a direct native Redis connection
$nativeRedis = new \Redis();
try {
if ($nativeRedis->connect(Env::get('REDIS_HOST', '127.0.0.1'), (int)Env::get('REDIS_PORT', 6379), 1.0)) {
$nativeVal = $nativeRedis->get('nabeh:test_cache_key');
if ($nativeVal) {
echo " ✅ Verified Prefixing: Native Redis key 'nabeh:test_cache_key' exists and has value: " . $nativeVal . "\n";
} else {
echo " ❌ Prefixing test failed: key not found in native Redis.\n";
}
$nativeRedis->close();
}
} catch (\Exception $ex) {
echo " Native verification connection skipped/failed: " . $ex->getMessage() . "\n";
}
Cache::delete('test_cache_key');
} else {
echo " Redis server is not running or unreachable (Fallback triggered, test completed successfully).\n";