C# 缓存一句话

 return ICacheService.Get<FilesInfoList>(CacheKeys.FilesList,
                () => repository.SelectAll(ref msg));

占位符存缓存

 public ExamTestInfo Select(string Code)
        {  
            return ICacheService.Get<ExamTestInfo>(string.Format(CacheKeys.TestPlan.Info, Code), () => repository.Select(Code, ref msg));
        }
 public class TestPlan
        {
            public const string CodeYear = "CodeYear";
            public const string Info = "ExamTest-{0}";
        }