Support the ongoing development of Laravel.io →
posted 9 years ago
Cache
Last updated 2 years ago.
0

Well, here's a workaround, the "nasty" way (not tested in production environment yet):

$redis = Redis::connection();
$host = $redis->getConnection()->getParameters()->host;
$port = $redis->getConnection()->getParameters()->port;
$fp = @fsockopen($host, $port);

if ( ! $fp) die('Redis server not responding at *' . $host . ':' . $port . '*');

If anyone knows a cleaner, more elegant way to do this, please let me know.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

samkitano samkitano Joined 14 Aug 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.