old content in Memcached

skyredwang - September 9, 2009 - 16:45
Project:Memcache API and Integration
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

I upgraded from 1.3 to 1.4 today. Then, every time I flush caches on Drupal, the old content remains in Memcached. For example, if I flush cache on the site, all those .js and .css files path are still the old ones in memcached, so anonymous users will see the broken site.

#1

Jeremy - September 15, 2009 - 17:55
Priority:critical» normal
Status:active» postponed (maintainer needs more info)

I'm unable to duplicate. How do you have memcache configured?

#2

skyredwang - September 15, 2009 - 18:21
Status:postponed (maintainer needs more info)» active

I configured using the codes below.

<?php
$conf
= array(
  
// The path to wherever memcache.inc is. The easiest is to simply point it
   // to the copy in your module's directory.
  
'cache_inc' => './sites/all/modules/memcache/memcache.inc',
  
// or
   // 'cache_inc' => './sites/all/modules/memcache/memcache.db.inc',
);
?>

for installation, I followed http://www.lullabot.com/articles/how_install_memcache_debian_etch

#3

beerman - November 10, 2009 - 15:02
Version:6.x-1.4» 6.x-1.x-dev
Priority:normal» critical

I've the same problem

my conf:

$conf['cache_inc'] = './sites/all/modules/authcache/memcache.inc';

$conf['memcache_servers'] = array( 'localhost:11210' => 'default',
                                   'localhost:11211' => 'block',
                                   'localhost:11212' => 'content',
                                   'localhost:11213' => 'filter',
                                   'localhost:11214' => 'menu',
                                   'localhost:11215' => 'page',
                                   'localhost:11216' => 'views',
                                   'localhost:11217' => 'views_data');
                                   
$conf['memcache_bins'] = array('cache'   => 'default',
                               'cache_block'   => 'block',
                               'cache_content'   => 'content',
                               'cache_filter' => 'filter',
                               'cache_menu' => 'menu',
                               'cache_page' => 'page',
                               'cache_views'   => 'views',
                               'cache_views_data' => 'views_data');

$conf['memcache_key_prefix'] = 'test2';

#4

dave_robinson - November 26, 2009 - 10:44

What versions of memcache and the pecl extension are you using.
There's an issue with using the latest (1.4.3) version of memcache. See http://pecl.php.net/bugs/bug.php?id=16927

#5

adamo - November 30, 2009 - 19:59

I have the same problem.

Using:
Memcache API module 6.x-1.4
Memcache PECL extension 2.2.5
Memcached 1.2.6, 1.2.8, 1.4.2, or 1.4.4

I have the same issue with all of the above versions of memcached. This is happening on a server with the most basic memcache config, as well as a config with multiple bins and session caching configured.

Please let me know if there's anything else I can do to help you get to the bottom of this.

edit: OK, this appears to be fixed in the latest dev snapshot. Maybe time for a new release?
edit: I was mistaken. Neither the 6.x-1.4 release nor the latest dev snapshot appear to be doing deletes properly.

#6

adamo - November 30, 2009 - 20:06

I also have the problem with Memcached 1.3.3.

#7

adamo - November 30, 2009 - 21:21

I uninstalled the latest Memcache API module and installed Memcache API 6.x-1.3. Now my cache is being flushed properly. Seems to work fine with memcached 1.2.6, 1.3.3, and 1.4.4. Seems like there's some kind of a bug in Memcache API 6.x-1.4 and above.

edit: With Memcache API 6.x-1.3 the cache seems to get invalidated every about every second request, so I really have no idea whether or not deletes are actually working.

#8

adamo - November 30, 2009 - 23:01

OK, I got a little further on this. I had "Minimum cache lifetime" set in the page caching settings. If this is set, dmemcache_flush() will never be called. I don't know if this is the desired behavior, but this isn't the way Drupal normally works. When using standard Drupal caching even if I have a "Minimum cache lifetime" set, if I hit the "Clear cached data" button, the cache gets cleared. When I hit the "Clear cached data" button I am doing so because I want the cache cleared right now. I don't see why you wouldn't want it to work that way.

Anyway, to others who experience this issue, make sure your "Minimum cache lifetime" is set to "None".

 
 

Drupal is a registered trademark of Dries Buytaert.