【发布时间】:2016-05-04 06:13:54
【问题描述】:
我的 core.php 中有这个配置
$memcacheServer = '127.0.0.1:11211';
$engine = 'Memcached';
Cache::config('default', array(
'engine' => $engine,
'duration' => 3600,
'probability' => 100,
'prefix' => $prefix,
'servers' => array(
$cacheServer // localhost, default port 11211
), //[optional]
'groups' => array(
'catalogs',
'products',
'aro',
'aco',
'product_categories',
'available.cats',
'available.prod.cats',
'this.user.catalogs',
'temp.comp.fetch' ,
'uc'
),
'persistent' => 'my_connection', // [optional] The name of the persistent connection.
'compress' => true, // [optional] compress data in Memcached (slower, but uses less memory)
));
Cache::config('_cake_core_', array(
'engine' => $engine,
'servers' => array(
$memcacheServer // localhost, default port 11211
),
'prefix' => $prefix . 'cake_core_',
'path' => CACHE . 'persistent' . DS,
'duration' => $duration,
'persistent' => 'my_connection'
));
Cache::config('_cake_model_', array(
'engine' => $engine,
'servers' => array(
$memcacheServer // localhost, default port 11211
),
'prefix' => $prefix . 'cake_model_',
'path' => CACHE . 'models' . DS,
'duration' => $duration,
'persistent' => 'my_connection'
));
当我保存时,在某些情况下,我会保存
Cache::clearGroup('available.prod.cats');
Cache::clearGroup('available.prod.cats');
Cache::clearGroup('this.user.catalogs');
Cake 似乎删除了所有与 Aro 和 Aco 模型相关的缓存模型。为什么?
【问题讨论】: