T_Cyjb_Cache_ICache_2 - CYJB/Cyjb GitHub Wiki
表示缓冲池的接口。
Namespace: Cyjb.Cache
Assembly: Cyjb (in Cyjb.dll) Version: 1.0.23+7750dd8e971297c5fa962a3bee37fb78f72793f6
C#
public interface ICache<TKey, TValue>
- TKey
- 缓存对象的键的类型。
- TValue
- 缓存对象的类型。
名称 | 说明 | |
---|---|---|
![]() |
Add | 将指定的键和对象添加到缓存中,无论键是否存在。 |
![]() |
Clear | 清空缓存中的所有对象。 |
![]() |
Contains | 确定缓存中是否包含指定的键。 |
![]() |
GetOrAdd(TKey, Func(TKey, TValue)) | 从缓存中获取与指定的键关联的对象,如果不存在则将新对象添加到缓存中。 |
![]() |
GetOrAdd(TArg)(TKey, TArg, Func(TKey, TArg, TValue)) | 从缓存中获取与指定的键关联的对象,如果不存在则将新对象添加到缓存中。 |
![]() |
Remove | 从缓存中移除具有指定键的对象。 |
![]() |
TryGet | 尝试从缓存中获取与指定的键关联的对象。 |