We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Taking a look at the Set method inside AbpMemoryCache (line 41):
else if (slidingExpireTime.HasValue) { _memoryCache.Set(key, value, slidingExpireTime.Value); }
and then to the corresponding extension method inside MemoryCacheExtensions (line 61):
public static TItem Set<TItem>(this IMemoryCache cache, object key, TItem value, TimeSpan absoluteExpirationRelativeToNow) { using ICacheEntry entry = cache.CreateEntry(key); entry.AbsoluteExpirationRelativeToNow = absoluteExpirationRelativeToNow; entry.Value = value; return value; }
We can see that AbsoluteExpirationRelativeToNow is being set instead of SlidingExpiration, and those two properties behave differently.
The only workaround I found at the moment is to handle MemoryCache directly, without going through ABP's ICacheManager.
The text was updated successfully, but these errors were encountered:
@titobf thanks, we will check this.
Sorry, something went wrong.
This is a serious issue for my project. How can I solve this problem temporarily?
@Omital I'm not sure but you can try to use suggestion here #6486 (comment)
@titobf could you check if this PR solves your problem #6546 ?
Hi @ismcagdas. Sorry, but the project is from my work and we just ended up using MemoryCache. Nevertheless, the file changes on your PR seem correct.
Thanks a lot. I will test it as well 👍
ismcagdas
Successfully merging a pull request may close this issue.
Taking a look at the Set method inside AbpMemoryCache (line 41):
and then to the corresponding extension method inside MemoryCacheExtensions (line 61):
We can see that AbsoluteExpirationRelativeToNow is being set instead of SlidingExpiration, and those two properties behave differently.
The only workaround I found at the moment is to handle MemoryCache directly, without going through ABP's ICacheManager.
The text was updated successfully, but these errors were encountered: