Microsoft Application Block for .NET - Cache

**Microsoft Application Block for .NET **

- Cache ** **

** 1. ** ** 工作流 ** ** **

![](http://dev.csdn.net/article/56/C:/Documents and Settings\user\Desktop\screen3.jpg)

** 2. ** Cache ** 的主要接口 ** ** **

· IDataProtection

保护 Cache 数据, Cache Framework 提供的有: ** DefaultDataProtection **

· ICacheItemExpiration

Cache 数据过期, Cache Framework 提供的有: ** AbsoluteTime, ExtendedFormatTime, FileDependency, SlidingTime ** .

· IScavengingAlgorithm

自动清除 Cache 项目, Cache Framework 提供的有: ** LruScavenging **

· ICacheStorage

Cache 的保存, Cache Framework 提供的有: ** MmfCacheStorage ** ** , ** ** **

** SingletonCacheStorage ** ** , ** ** SqlServerCacheStorage **

** 3. ** ** 主要类 ** ** **

· Cache manager

· Cache service

· Cache storage


** 4. ** ** 配置文件 ** ** **

主要对数据保护,数据过期,数据清除,数据保存进行配置。

** 5. ** ** 调用方法 ** ** **

CacheManager. Add 方法增加一个对象到 Cache

CacheManager. GetData 或 ** GetItem ** 方法从 Cache 获得一个对象

CacheManager. Flush 和 ** Remove ** 方法将清空 Cache 或移除一个对象




Published At
Categories with Web编程
Tagged with
comments powered by Disqus