Hi,

I found that when I submitted the ad settings form in an effort to change the Memcache sync frequency it didn't actually store the value I had submitted. Looking directly in the database the variable didn't exist i.e. ad_memcache_sync.

I looked in to the code and found that the variable should have been set during :

* ad_memcache.module > hook_adcacheapi > settings_submit > Line 71

variable_set('ad_memcache_sync', $node['ad_memcache_sync']);

Everything looked good here so I went up a level to :

* ad.admin.inc > ad_admin_configure_settings_submit > Line 674

And found :

  if (($cache = variable_get('ad_cache', 'none')) != 'none') {
    // Allow external cache types to store their settings
    module_invoke('ad_cache_'. $cache, 'adcacheapi', 'settings_submit', $form_state['values']);
  }

The problem with this is it is trying to invoke a module by the name of 'ad_cache_memcache' when the module is actually called 'ad_memcache'. Hence the above hook_adcacheapi is never being called (in this context).

I made the following change :

  if (($cache = variable_get('ad_cache', 'none')) != 'none') {
    // Allow external cache types to store their settings
    if ($cache == 'memcache') {
      module_invoke('ad_'. $cache, 'adcacheapi', 'settings_submit', $form_state['values']);
    } else {
      module_invoke('ad_cache_'. $cache, 'adcacheapi', 'settings_submit', $form_state['values']);
    }
  }

Which is obviously not amazing but does the job in this instance. Outside of renaming the ad_memcache module or changing the reliance on naming convention I'm not sure what to suggest.

Thanks for the module, loves it!