예제 #1
0
        string GetJsonData <T>(T data, int cacheTime, bool forceOutOfDate)
        {
            var cacheObject = new CacheObject <T>()
            {
                Value = data, ExpireTime = cacheTime, ForceOutofDate = forceOutOfDate
            };

            return(cacheObject.ToJson());//序列化对象
        }