/****************************************************************************** Copyright 2005-2007 R2@DevFx.NET DevFx.NET is free software; you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. DevFx.NET is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public License for more details. You should have received a copy of the Lesser GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA /*******************************************************************************/ using Lskj.DevFx.Config; namespace Lskj.DevFx.Cache { /// /// 缓存管理器接口 /// /// /// 缓存管理器的配置: /// /// <configuration> /// ...... /// /// <cache type="缓存管理器类型"> /// <caches><!--这里配置缓存空间(多实例模式)--> /// ...... /// </caches> /// </cache> /// /// ...... /// </configuration> /// /// public interface ICacheManager { /// /// 初始化,由框架调用 /// /// 缓存管理器的配置节 void Init(IConfigSetting setting); /// /// 获取缓存空间 /// /// 在配置文件上配置的缓存空间名 /// 实现ICache接口的缓存器实例 ICache GetCache(string cacheName); /// /// 以一定的配置节来实例化缓存器 /// /// 缓存器配置节 /// 实现ICache接口的缓存器实例 ICache GetCache(IConfigSetting cacheSetting); /// /// 新增一个缓存空间 /// /// /// ICache AddCache(string cacheName); /// /// 新增一个缓存空间 /// /// /// 清除过期缓存的间隔,单位:毫秒 /// ICache AddCache(string cacheName, int interval); /// /// 移除指定名称的缓存空间 /// /// void RemoveCache(string cacheName); /// /// 移除所有缓存空间 /// void Clear(); } }