$current_url=str_replace(array("?refresh=${secret_string}","&refresh=${secret_string}"),'',"http://${_SERVER['HTTP_HOST']}${_SERVER['REQUEST_URI']}");//clean up the URL
$redis_key=md5($current_url);
try{
...
...
@@ -31,8 +33,7 @@ try {
if(class_exists('Redis')){
$redis=newRedis();
// Sockets can be used as well '/tmp/redis.sock'
// documentation can be found at https://github.com/nicolasff/phpredis/#connection
// Sockets can be used as well. Documentation @ https://github.com/nicolasff/phpredis/#connection
$redis->connect('127.0.0.1');
}else// Fallback to predis5.2.php
...
...
@@ -40,55 +41,55 @@ try {
include("wp-content/plugins/wp-redis-cache/predis5.2.php");//we need this to use Redis inside of PHP
$redis=newPredis_Client();
}
}catch(Exception$e){
$redisError=true;
}
//Either manual refresh cache by adding ?refresh=secret_string after the URL or somebody posting a comment