diff --git a/VirtoCommerce.Storefront/Caching/StorefrontMemoryCache.cs b/VirtoCommerce.Storefront/Caching/StorefrontMemoryCache.cs index 80b6fd301..5464fc445 100644 --- a/VirtoCommerce.Storefront/Caching/StorefrontMemoryCache.cs +++ b/VirtoCommerce.Storefront/Caching/StorefrontMemoryCache.cs @@ -47,7 +47,7 @@ public bool TryGetValue(object key, out object value) return _memoryCache.TryGetValue(key, out value); } - protected TimeSpan AbsoluteExpiration => _storefrontOptions.CacheAbsoluteExpiration; + protected TimeSpan? AbsoluteExpiration => _storefrontOptions.CacheAbsoluteExpiration; protected bool CacheEnabled => _storefrontOptions.CacheEnabled; diff --git a/VirtoCommerce.Storefront/Infrastructure/StorefrontOptions.cs b/VirtoCommerce.Storefront/Infrastructure/StorefrontOptions.cs index 50dd790ab..5cacf2ff1 100644 --- a/VirtoCommerce.Storefront/Infrastructure/StorefrontOptions.cs +++ b/VirtoCommerce.Storefront/Infrastructure/StorefrontOptions.cs @@ -15,7 +15,7 @@ public class StorefrontOptions public bool CacheEnabled { get; set; } - public TimeSpan CacheAbsoluteExpiration { get; set; } + public TimeSpan? CacheAbsoluteExpiration { get; set; } public int PageSizeMaxValue { get; set; } = 100; diff --git a/VirtoCommerce.Storefront/appsettings.json b/VirtoCommerce.Storefront/appsettings.json index d9eac169c..f7a691d1a 100644 --- a/VirtoCommerce.Storefront/appsettings.json +++ b/VirtoCommerce.Storefront/appsettings.json @@ -5,7 +5,6 @@ "VirtoCommerce": { "DefaultStore": "Electronics", "CacheEnabled": "true", - "CacheAbsoluteExpiration": "10:00:00", "PageSizeMaxValue": 100, "Endpoint": { "Url": "http://localhost/admin",