【文件属性】:
文件名称:登记缓存-神策数据-大数据分析
文件大小:6.51MB
文件格式:PDF
更新时间:2024-06-28 17:20:07
OF深入浅出
一、缓存配置
缓存配置信息 PluginCacheConfigurator
二、登记缓存
插件的缓存配置信息在 PluginCacheRegistry类中:
publicpublicpublicpublic voidvoidvoidvoid registerCache(String pluginName, CacheInfo info) {
extraCacheMappings.put(info.getCacheName(), info);
List caches = pluginCaches.get(pluginName);
ifififif (caches == nullnullnullnull) {
caches = newnewnewnewArrayList();
pluginCaches.put(pluginName, caches);
}
caches.add(info);
// Set system properties for this cache
CacheFactory.setCacheTypeProperty(info.getCacheName(), info.getType().getName());
CacheFactory.setMaxSizeProperty(info.getCacheName(),
getMaxSizeFromProperty(info));
CacheFactory.setMaxLifetimeProperty(info.getCacheName(),
getMaxLifetimeFromProperty(info));
CacheFactory.setMinCacheSize(info.getCacheName(), getMinSizeFromProperty(info));