35 lines
905 B
C#
35 lines
905 B
C#
using EnVisage.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace EnVisage.Code.Cache
|
|
{
|
|
public class ClientInfoAPICache : Cache<ClientInfoControlModel>
|
|
{
|
|
protected override string CACHE_KEY
|
|
{
|
|
get
|
|
{
|
|
return "ClientInfo";
|
|
}
|
|
}
|
|
public ClientInfoAPICache():base(false)
|
|
{
|
|
|
|
}
|
|
public override void AddValueToCache(ClientInfoControlModel obj)
|
|
{
|
|
CacheManager.Instance.AddToCache(CACHE_KEY, obj);
|
|
}
|
|
public override ClientInfoControlModel GetValueFromCache()
|
|
{
|
|
if (CacheManager.Instance.IsInCache(CACHE_KEY))
|
|
return (ClientInfoControlModel)CacheManager.Instance.GetCacheData(CACHE_KEY);
|
|
return null;
|
|
|
|
}
|
|
}
|
|
} |