Skip to content

Commit

Permalink
Fix potential bug with irrational memory usage leads to memory exhausted
Browse files Browse the repository at this point in the history
  • Loading branch information
tatarincev committed Jun 5, 2019
1 parent 4151c60 commit 13d1ff3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VirtoCommerce.Storefront/Caching/StorefrontMemoryCache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion VirtoCommerce.Storefront/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"VirtoCommerce": {
"DefaultStore": "Electronics",
"CacheEnabled": "true",
"CacheAbsoluteExpiration": "10:00:00",
"PageSizeMaxValue": 100,
"Endpoint": {
"Url": "http://localhost/admin",
Expand Down

0 comments on commit 13d1ff3

Please sign in to comment.