We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Getting memcached to clear -- faulty setting or other issue?

How Do I?

Linda A's avatar
Linda A
647 posts
8 years ago
Linda A's avatar Linda A

In config.php:

$config['cache_driver'] = 'memcached';
$config['memcached'] = array(
        'host' => '127.0.0.1',
        'port' => 11211,
        'weight' => 2,
    );

Not strictly sure I found the right config file for memcached, its very brief:

PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS=""
       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

That all looks normal and fairly typical. Let me know how the external test goes, or if you’ve successfully switched to Redis. I cannot replicate your issue and can’t find a record of anyone else experiencing this problem either. It doesn’t mean that there’s not an issue, but that it seems to be environmental, so perhaps the isolated test will yield you some results.

       
Linda A's avatar
Linda A
647 posts
8 years ago
Linda A's avatar Linda A

Will keep you updated. Also considering going ahead and trying to upgrade to v3, since its just the one add-on I need to replace now.

       
Linda A's avatar
Linda A
647 posts
8 years ago
Linda A's avatar Linda A

Have not yet updated to v3, but I did finally had the opportunity to change from Memcached to Redis to see if things might work better. Unfortunately, while I have Redis working with forum software on the same server, my EE site says it can’t seem to connect to the Redis server and defaults to file cache.

Any suggestions? We’re using the pecl/redis PHP module.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Did you update your config to point to your Redis server?

       
Linda A's avatar
Linda A
647 posts
8 years ago
Linda A's avatar Linda A

I did, but still doesn’t seem able to connect. Also went and implemented Redis on on a Mediawiki install and that, too, is working.

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Try putting this in a standalone PHP file on the server where you host ExpressionEngine. Change the config to match your Redis server settings.

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

$config = array(
 'host' => '127.0.0.1',
 'password' => NULL,
 'port' => 6379,
 'timeout' => 0
);

$redis = new Redis();
$result = $redis->connect($config['host'], $config['port'], $config['timeout']);
       
Linda A's avatar
Linda A
647 posts
8 years ago
Linda A's avatar Linda A

Got it sorted out and it seems to be working. Thanks!

       
Derek Jones's avatar
Derek Jones
7,561 posts
8 years ago
Derek Jones's avatar Derek Jones

Redis or memcache? Both? Glad to hear it either way!

       
1 2

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.