mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-25 15:42:50 +08:00
29 lines
717 B
C#
29 lines
717 B
C#
using NetAdmin.Application.Services;
|
|
|
|
namespace NetAdmin.Cache;
|
|
|
|
/// <summary>
|
|
/// 缓存基类
|
|
/// </summary>
|
|
public abstract class CacheBase<TCacheContainer, TService> : ICache<TCacheContainer, TService>
|
|
where TService : IService
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="CacheBase{TCacheLoad, TService}" /> class.
|
|
/// </summary>
|
|
protected CacheBase(TCacheContainer cache, TService service)
|
|
{
|
|
Cache = cache;
|
|
Service = service;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 缓存对象
|
|
/// </summary>
|
|
public TCacheContainer Cache { get; }
|
|
|
|
/// <summary>
|
|
/// 关联的服务
|
|
/// </summary>
|
|
public TService Service { get; }
|
|
} |