Hi,

Not sure if this is a bug or a feature request. With flush_all set to true for memcache engine, currently a delete using wildcard and prefix is silently ignored. With flush_all bins, it's better to delete everything more than keeping unexpired entries, the same should be true for deleting with wildcard and prefix. That is, unexpired entries are not that important.

If this is not desirable, please make an option to choose this behavior.

Hope my bad writing is not too confusing. ^ ^

Comments

ball.in.th’s picture

Please note that in the memcache module, if $wildcard is true the entire bin is flushed regardless the value of $cid. So this behavior is not uncommon at all.

davidwhthomas’s picture

I have the same issue with memcache enabled, adding cck fields is problematic as the cache doesn't clear after adding the field, so it appears to not be added.

There's also problems with the session handling part of cache with a separate memcache server, it just doesn't seem to use the other engine.

Otherwise a very useful module! Hopefully it can evolve past these issues, I'd be happy to help with a few pointers as to what needs doing

fuerst’s picture

I confirm this behaviour: Using the Panels module and memcache bins for cache, cache_form, cache_page, cache_filter I had trouble getting changes to Panels pages content and layouts appear at the live page. Preview in the Panels page edit mode always worked. Restarting memcached daemon helps.

davidwhthomas’s picture

I found using specific bins and excluding cache_form helped.

here's my settings.php bins conf

<?php
// Configure cache
// See sites/all/modules/cache/README.txt for more information on settings
$conf['cache_inc'] = './sites/all/modules/cache/cache.inc';
//$conf['session_inc'] = './sites/all/modules/cache/session.inc';
$conf['cache_settings'] = array(
  'engines' => array(
    'database-engine' => array(
      'engine' => 'database'
    ),
    'fast-engine' => array(
      'engine' => 'memcache',
      'server' => array('127.0.0.1:11211'),
      'prefix' => 'ro',
      'flush_all' => TRUE,
      'shared' => FALSE,
      'fast_cache' => FALSE,
    )
  ),
  'schemas' => array(
    // use cache chaining - check memcache first, then fallback to DB on failure
    'database-schema' => array(
      'database-engine'
    ),
    'normal-schema' => array(
      'fast-engine',
      'database-engine'
    ),
    'fast-schema' => array(
      'fast-engine'
    ),
  ),
  'bins' => array(
    'default' => 'database-schema',
    'cache' => 'normal-schema',
    'cache_block' => 'normal-schema',
    'cache_content' => 'normal-schema',
    'cache_filter' => 'normal-schema',
    //'cache_form' => 'database-schema',
    'cache_menu' => 'normal-schema',
    'cache_page' => 'normal-schema',
    'cache_path_alias' => 'normal-schema',
    'cache_path_source' => 'normal-schema',
    //'cache_session' => 'database-schema',
    //'cache_session_user' => 'database-schema',
    'cache_update' => 'normal-schema',
    'cache_views' => 'normal-schema',
    'cache_views_data' => 'normal-schema',
  )
);
?>
ball.in.th’s picture

For 'flush_all' => TRUE, I think there should be a separate memcache server for each bin.