Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lock (locker)
- {
- if (HttpRuntime.Cache[cacheKey] == null)
- {
- HttpRuntime.Cache.Insert(cacheKey, GetSomeDataToCache(), null, DateTime.Today.AddDays(1), Cache.NoSlidingExpiration);
- }
- return ((SomeData)HttpRuntime.Cache[cacheKey]).Copy();
- }
Add Comment
Please, Sign In to add comment