设置 Cache 的过期时间
Cache.Insert("DSN", connectionString, null, DateTime.Now.AddMinutes(2), TimeSpan.Zero);
下面的示例展示如何向缓存中插入具有可调整过期的项
Cache.Insert("DSN", connectionString, null, DateTime.MaxValue, TimeSpan.FromSeconds(10));
转载于:https://www.cnblogs.com/KeeWang/archive/2011/01/15/1936161.html