Backed out changeset: 021b467c8725

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2012-10-10 14:31:37 -07:00
parent bda2dfb127
commit ec0e0fa7d9
2 changed files with 0 additions and 20 deletions

View File

@@ -23,24 +23,6 @@ namespace Orchard.Caching {
return entry.Result;
}
public bool TryGet(TKey key, out TResult value){
CacheEntry cacheEntry;
if (_entries.TryGetValue(key, out cacheEntry)){
value = cacheEntry.Result;
return true;
}
value = default(TResult);
return false;
}
public bool IsValid(TKey key){
CacheEntry currentEntry;
if (_entries.TryGetValue(key, out currentEntry)){
return currentEntry.Tokens.Any(t => !t.IsCurrent);
}
return false;
}
private CacheEntry AddEntry(TKey k, Func<AcquireContext<TKey>, TResult> acquire) {
var entry = CreateEntry(k, acquire);
PropagateTokens(entry);

View File

@@ -3,7 +3,5 @@
namespace Orchard.Caching {
public interface ICache<TKey, TResult> {
TResult Get(TKey key, Func<AcquireContext<TKey>, TResult> acquire);
bool IsValid(TKey key);
bool TryGet(TKey key, out TResult value);
}
}