• Resolved simkog

    (@simkog)


    Dear Developer,

    With the new WordPress update, Site Health suggests I use some persistent object cache.

    I’ve tried your plugin as it has Redis and memcached built in. I’ve found some strange things.

    I’ve activated the Redis extension within Cpanel. After that, I created a sample PHP file to check if Redis works fine.

    
    $redis = new Redis();
    $redis->connect( '127.0.0.1', 6379 );
    

    This sample file just throws an error:
    Fatal error: Uncaught RedisException: Connection refused in redis.php.

    Then, I tried your plugin, and activated Redis as an object cache, and it works. The server is the same as in my test file (127.0.0.1:6379) and your plugin could connect to it. The Test button also works (Gives me a Test passed. message.)

    I’ve contacted my host and they said that Redis is not available on shared hostings (which I have) only on their VPSs.

    So, how your plugin can use Redis if my hosting doesn’t support it? And why the test button says Test passed. if Redis not running (or reachable)?

    Best regards,
    Gergo Simko

    • This topic was modified 2 years, 4 months ago by simkog. Reason: formatting
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @simkog

    Thank you for reaching out and I am happy to assist you with this.
    The W3 Total Cache checks for the PHP Redis extension. When detected, Redis is available as a caching method for caching modules. If it’s not detected the Redis option is greyed out.
    The question is how you managed to enable the Redis extension on your host if it’s not available when on shared hosting.
    Are you on shared hosting or Dedicated/VPS?

    In the screenshot above, you can see when the website is on a shared hosting where I cannot use Redis.
    Thanks!

    Thread Starter simkog

    (@simkog)

    Dear @vmarko,

    I have a shared hosting plan. The hosting provider said that the Redis PHP extension can be enabled regardless of whether an actual Redis service is running or not.

    So, I think your plugin should check if the Redis server is actually reachable through the testing phrase.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @simkog

    Thank you for the information.
    W3TC checks if the class is available. I am surprised that some shots actually allow this to happen.
    If your hosting provider confirmed that you cannot use Redis, make sure it’s not selected.
    I’ll bring this to the team and we’ll see if in the future we can implement something for these kinds of situations as rare as they may be.

    Thanks!

    Thread Starter simkog

    (@simkog)

    Dear @vmarko,

    I had time to test other caching plugins.

    Litespeed Cache plugin checks if either Redis or Memcached extension exists and makes a connection test to it, too.

    https://i.imgur.com/qE5F8ko.png.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Redis as object cache’ is closed to new replies.