Taşkın Özdemir 2024-01-13 01:07:16 +01:00 committed by GitHub
commit f9b3ea42c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,10 @@ namespace RulesEngine.HelperFunctions
public T Set<T>(string key, T value, DateTimeOffset? expiry = null)
{
if (_config.SizeLimit < 1)
{
return T;
}
var fixedExpiry = expiry ?? DateTimeOffset.MaxValue;
while (_cacheDictionary.Count > _config.SizeLimit)