2013-03-23 04:01:52 +06:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Cache
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
2013-05-13 19:31:27 -10:00
|
|
|
|
/// An abstract class for implementing a basic cache provider
|
2013-03-23 04:01:52 +06:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// THIS MUST REMAIN INTERNAL UNTIL WE STREAMLINE HOW ALL CACHE IS HANDLED, WE NEED TO SUPPORT HTTP RUNTIME CACHE, IN MEMORY CACHE, ETC...
|
|
|
|
|
|
/// </remarks>
|
|
|
|
|
|
internal abstract class CacheProviderBase
|
|
|
|
|
|
{
|
|
|
|
|
|
public abstract void ClearAllCache();
|
|
|
|
|
|
public abstract void ClearCacheItem(string key);
|
|
|
|
|
|
public abstract void ClearCacheObjectTypes(string typeName);
|
|
|
|
|
|
public abstract void ClearCacheObjectTypes<T>();
|
2013-09-18 10:05:44 +02:00
|
|
|
|
public abstract void ClearCacheObjectTypes<T>(Func<string, T, bool> predicate);
|
2013-03-23 04:01:52 +06:00
|
|
|
|
public abstract void ClearCacheByKeySearch(string keyStartsWith);
|
|
|
|
|
|
public abstract void ClearCacheByKeyExpression(string regexString);
|
|
|
|
|
|
public abstract IEnumerable<T> GetCacheItemsByKeySearch<T>(string keyStartsWith);
|
|
|
|
|
|
public abstract T GetCacheItem<T>(string cacheKey);
|
|
|
|
|
|
public abstract T GetCacheItem<T>(string cacheKey, Func<T> getCacheItem);
|
|
|
|
|
|
}
|
2013-05-13 19:31:27 -10:00
|
|
|
|
}
|