grandnode / grandnode2

Open-Source eCommerce Platform on .NET Core, MongoDB, AWS DocumentDB, Azure CosmosDB, LiteDB & Vue.js
https://grandnode.com/
GNU General Public License v3.0
1.06k stars 435 forks source link

Caching\MemoryCacheBase.cs System.ArgumentOutOfRangeException: The relative expiration value must be positive. (Parameter 'AbsoluteExpirationRelativeToNow') #438

Closed tung-nt-niteco closed 9 months ago

tung-nt-niteco commented 9 months ago

Unhandled exception. System.ArgumentOutOfRangeException: The relative expiration value must be positive. (Parameter 'AbsoluteExpirationRelativeToNow') Actual value was 00:00:00. at Microsoft.Extensions.Caching.Memory.MemoryCacheEntryOptions.set_AbsoluteExpirationRelativeToNow(Nullable`1 value) at Grand.Infrastructure.Caching.MemoryCacheBase.GetMemoryCacheEntryOptions(Int32 cacheTime) in \src\Core\Grand.Infrastructure\Caching\MemoryCacheBase.cs:line 158

I am using SDK version 6.0.306

KrzysztofPajak commented 9 months ago

@tung-nt-niteco please find file appsettings.json and check value on setting: DefaultCacheTimeMinutes, should be more than zero

tung-nt-niteco commented 9 months ago

@tung-nt-niteco please find file appsettings.json and check value on setting: DefaultCacheTimeMinutes, should be more than zero

Worked, thank you. Do you know what it actually caches, and will it invalidate cache when the data is changed (insert/update/delete)?

KrzysztofPajak commented 9 months ago

Yes, cache is invalidated when data has been changed