using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace RoadFlow.Cache.IO { public class Opation { private static Interface.ICache myCache = Factory.Cache.CreateInstance(); /// /// 插入缓存 /// /// /// /// public static bool Insert(string key, object obj) { return myCache.Insert(key, obj); } /// /// 设置缓存 /// /// /// /// public static bool Set(string key, object obj) { return Insert(key, obj); } /// /// 插入缓存 /// /// /// /// public static bool Insert(string key, object obj, DateTime expiry) { return myCache.Insert(key, obj, expiry); } /// /// 插入缓存 /// /// /// /// public static bool Set(string key, object obj, DateTime expiry) { return Insert(key, obj, expiry); } /// /// 获取缓存 /// /// /// public static object Get(string key) { return myCache.Get(key); } /// /// 移出缓存 /// /// public static bool Remove(string key) { return myCache.Remove(key); } /// /// 清空所有缓存 /// /// public static void RemoveAll() { myCache.RemoveAll(); } } }