#21182 Fixing generation of CacheItemPolicy used in Put.

Work Item: 21182
This commit is contained in:
Kegan Maher
2015-03-05 22:58:36 +01:00
committed by Zoltán Lehóczky
parent 5ff2ad509b
commit 8101542d9e

View File

@@ -23,7 +23,7 @@ namespace Orchard.Caching.Services {
}
public void Put<T>(string key, T value, TimeSpan validFor) {
_cache.Set(key, value, GetCacheItemPolicy(new DateTimeOffset(_clock.UtcNow).ToOffset(validFor)));
_cache.Set(key, value, GetCacheItemPolicy(new DateTimeOffset(_clock.UtcNow.Add(validFor))));
}
public void Remove(string key) {