Support » Plugin: LiteSpeed Cache » Object Cache Connection Test Failed

  • Resolved deborah86

    (@deborah86)


    The connection test for the object cache failed. According to the host, it should work.

    Status
    Memcached Extension: Enabled
    Redis Extension: Disabled
    Connection Test: Failed Learn More

    Report number: IFPOQARE

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    if you are using Memcached

    please create a php file with following code

    <?php
    
    $mem = new Memcached();
    $mem->addServer("127.0.0.1", 11211);
    
    $mem->set('key1', 'This is first value', 60);
    $val = $mem->get('key1');
    echo "Get key1 value: " . $val ."<br />";
    
    $mem->replace('key1', 'This is replace value', 60);
    $val = $mem->get('key1');
    echo "Get key1 value: " . $val . "<br />";
    
    $arr = array('aaa', 'bbb', 'ccc', 'ddd');
    $mem->set('key2', $arr, 60);
    $val2 = $mem->get('key2');
    echo "Get key2 value: ";
    print_r($val2);
    echo "<br />";
    
    $mem->delete('key1');
    $val = $mem->get('key1');
    echo "Get key1 value: " . $val . "<br />";
    
    $mem->flush();
    $val2 = $mem->get('key2');
    echo "Get key2 value: ";
    print_r($val2);
    echo "<br />";
    
    $mem->close();

    access it by browser, and see what it returns

    this is a standalone PHP script to test memcached connectivity

    Best regards,

    Thread Starter deborah86

    (@deborah86)

    Here is the page with the results: https://lazyjack.blog/memcache-test/

    Plugin Support qtwrk

    (@qtwrk)

    Hi

    no no no, don’t inject it into wordpress system

    create a separated, standalone PHP file with above code and then access it

    Best regards,

    Thread Starter deborah86

    (@deborah86)

    I don’t understand how you want me to create the file. Here is another attempt.

    Thread Starter deborah86

    (@deborah86)

    My host informed me that Memcached is not installed on the server. Why is it showing as enabled in the plugin if it isn’t?

    Plugin Support qtwrk

    (@qtwrk)

    if you create a phpinfo page , does it show you memcached extension ?

    Thread Starter deborah86

    (@deborah86)

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    it does have memcached extension , but for whatever reason that beyond my very limited knowledge , it doesn’t work properly.

    it’s not just with our plugin , even that simple test code didn’t work , that indicates something wrong with your server or your PHP

    please contact your provider for further assistance

    bottom line is that please make sure the test script works first.

    Best regards,

    Thread Starter deborah86

    (@deborah86)

    This is the response from the hosting company:

    Memcached is installed for administrative purposes, it’s not supported by Dynamic Hosting and it’s not available for configuration at this time.

    Since it is not really necessary based on your own documentation, I will disable the Object Cache setting.

    If you have a site that is fully-cached by LSCWP, you won’t use object cache very often. Object cache is only necessary when WordPress is building a page through PHP. If PHP is not being invoked (and minimizing PHP usage is the goal with LSCache) then there are no queries to process and therefore nothing to look up in object cache.

    Memcached, LSMCD and Redis (Object Cache) Support in LSCWP

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.