using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Web;
namespace IStation.Application
{
///
/// 缓存辅助类
///
public class CacheHelper
{
///
/// 一级缓存
///
public static int CacheLevel1
{
get
{
if (_cachelevel1 == null)
{
_cachelevel1 = Settings.MemoryCache.Level1;
}
return _cachelevel1.Value;
}
}
private static int? _cachelevel1;
///
/// 二级缓存
///
public static int CacheLevel2
{
get
{
if (_cachelevel2 == null)
{
_cachelevel2 = Settings.MemoryCache.Level2;
}
return _cachelevel2.Value;
}
}
private static int? _cachelevel2;
///
/// 三级缓存
///
public static int CacheLevel3
{
get
{
if (_cachelevel3 == null)
{
_cachelevel3 = Settings.MemoryCache.Level3;
}
return _cachelevel3.Value;
}
}
private static int? _cachelevel3;
///
/// 四级缓存
///
public static int CacheLevel4
{
get
{
if (_cachelevel4 == null)
{
_cachelevel4 = Settings.MemoryCache.Level4;
}
return _cachelevel4.Value;
}
}
private static int? _cachelevel4;
///
/// 五级缓存
///
public static int CacheLevel5
{
get
{
if (_cachelevel5 == null)
{
_cachelevel5 = Settings.MemoryCache.Level5;
}
return _cachelevel5.Value;
}
}
private static int? _cachelevel5;
}
}