Update MemCache.cs

We need to disable memory cache.
pull/460/head
Taşkın Özdemir 2023-02-17 16:34:37 +03:00 committed by GitHub
parent caf41e3cd3
commit b61532874e
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)