parent
caf41e3cd3
commit
b61532874e
|
@ -79,6 +79,10 @@ namespace RulesEngine.HelperFunctions
|
||||||
|
|
||||||
public T Set<T>(string key, T value, DateTimeOffset? expiry = null)
|
public T Set<T>(string key, T value, DateTimeOffset? expiry = null)
|
||||||
{
|
{
|
||||||
|
if (_config.SizeLimit < 1)
|
||||||
|
{
|
||||||
|
return T;
|
||||||
|
}
|
||||||
var fixedExpiry = expiry ?? DateTimeOffset.MaxValue;
|
var fixedExpiry = expiry ?? DateTimeOffset.MaxValue;
|
||||||
|
|
||||||
while (_cacheDictionary.Count > _config.SizeLimit)
|
while (_cacheDictionary.Count > _config.SizeLimit)
|
||||||
|
|
Loading…
Reference in New Issue