Methods_T_Cyjb_Cache_SimplyCache_2 - CYJB/Cyjb GitHub Wiki

SimplyCache(TKey, TValue) 方法

The SimplyCache(TKey, TValue) generic type exposes the following members.

方法

 

名称 说明
公共方法 Add 将指定的键和对象添加到缓存中,无论键是否存在。
公共方法 Clear 清空缓存中的所有对象。
公共方法 Contains 确定缓存中是否包含指定的键。
公共方法 Equals Determines whether the specified object is equal to the current object. (继承自 Object。)
公共方法 GetHashCode Serves as the default hash function. (继承自 Object。)
公共方法 GetOrAdd(TKey, Func(TKey, TValue)) 从缓存中获取与指定的键关联的对象,如果不存在则将新对象添加到缓存中。
公共方法 GetOrAdd(TArg)(TKey, TArg, Func(TKey, TArg, TValue)) 从缓存中获取与指定的键关联的对象,如果不存在则将新对象添加到缓存中。
公共方法 GetType Gets the Type of the current instance. (继承自 Object。)
公共方法 Remove 从缓存中移除具有指定键的对象。
公共方法 ToString Returns a string that represents the current object. (继承自 Object。)
公共方法 TryGet 尝试从缓存中获取与指定的键关联的对象。
  Back to Top

参见

Reference

SimplyCache(TKey, TValue) 类
Cyjb.Cache 命名空间

⚠️ **GitHub.com Fallback** ⚠️