2013-03-23 04:01:52 +06:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Web.Caching;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Cache
|
|
|
|
|
|
{
|
2013-12-16 12:51:02 +11:00
|
|
|
|
internal class NullCacheProvider : IRuntimeCacheProvider
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void ClearAllCache()
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void ClearCacheItem(string key)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void ClearCacheObjectTypes(string typeName)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void ClearCacheObjectTypes<T>()
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-09-18 10:05:44 +02:00
|
|
|
|
public override void ClearCacheObjectTypes<T>(Func<string, T, bool> predicate)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-03-23 04:01:52 +06:00
|
|
|
|
public override void ClearCacheByKeySearch(string keyStartsWith)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void ClearCacheByKeyExpression(string regexString)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual IEnumerable<T> GetCacheItemsByKeySearch<T>(string keyStartsWith)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
return Enumerable.Empty<T>();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual T GetCacheItem<T>(string cacheKey)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
return default(T);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual T GetCacheItem<T>(string cacheKey, Func<T> getCacheItem)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
return getCacheItem();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual T GetCacheItem<T>(string cacheKey, TimeSpan? timeout, Func<T> getCacheItem)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
return getCacheItem();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual T GetCacheItem<T>(string cacheKey, CacheItemRemovedCallback refreshAction, TimeSpan? timeout, Func<T> getCacheItem)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
return getCacheItem();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual T GetCacheItem<T>(string cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, TimeSpan? timeout, Func<T> getCacheItem)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
return getCacheItem();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual T GetCacheItem<T>(string cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan? timeout, Func<T> getCacheItem)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
return getCacheItem();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void InsertCacheItem<T>(string cacheKey, CacheItemPriority priority, Func<T> getCacheItem)
|
2013-04-03 22:34:40 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void InsertCacheItem<T>(string cacheKey, CacheItemPriority priority, TimeSpan? timeout, Func<T> getCacheItem)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void InsertCacheItem<T>(string cacheKey, CacheItemPriority priority, CacheDependency cacheDependency, TimeSpan? timeout, Func<T> getCacheItem)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2013-12-16 12:51:02 +11:00
|
|
|
|
public virtual void InsertCacheItem<T>(string cacheKey, CacheItemPriority priority, CacheItemRemovedCallback refreshAction, CacheDependency cacheDependency, TimeSpan? timeout, Func<T> getCacheItem)
|
2013-03-23 04:01:52 +06:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|