JHCache.Set Method (String, Object, DateTime)

DCSoft.DBUtilityGeneric

JHCacheSet Method (String, Object, DateTime)
将指定项添加到 System.Web.Caching.Cache 对象 使用较高的优先级别,在服务器释放系统内存时,具有该优先级级别的缓存项最不可能被从缓存删除

Namespace: DCSoft.Utility.Web
Assembly: DCSoft.Utility (in DCSoft.Utility.dll) Version: 0.0.0.0 (1.0.0.0)
Syntax
C#
public static bool Set(
	string key,
	Object value,
	DateTime absoluteExpiration
)

Parameters

key
Type: SystemString
缓存键
value
Type: SystemObject
缓存值
absoluteExpiration
Type: SystemDateTime
所添加对象将到期并被从缓存中移除的时间

Return Value

Type: Boolean
返回一个值,该值指示缓存是否设置成功
See Also