namespace NetAdmin.Domain.Dto.Sys.Cache;
///
/// 响应:获取所有缓存项
///
public sealed record GetAllEntriesRsp : DataAbstraction
{
///
/// Initializes a new instance of the class.
///
public GetAllEntriesRsp() { }
///
/// Initializes a new instance of the class.
///
public GetAllEntriesRsp(long absExp, string key, long sldExp, string data)
{
AbsExp = absExp;
Key = key;
SldExp = sldExp;
Data = data;
}
///
/// 绝对过期时间
///
public DateTime? AbsExpTime => AbsExp == -1 ? null : DateTime.FromBinary(AbsExp).ToLocalTime();
///
/// 滑动过期时间
///
public DateTime? SldExpTime => SldExp == -1 ? null : DateTime.FromBinary(SldExp).ToLocalTime();
///
/// 绝对过期时间
///
public long AbsExp { get; init; }
///
/// 缓存值
///
public string Data { get; init; }
///
/// 缓存键
///
public string Key { get; init; }
///
/// 滑动过期时间
///
public long SldExp { get; init; }
}