Skip to content

Commit

Permalink
Fix #367
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Sep 29, 2022
1 parent 6e44671 commit 134a83f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/ImageResizer.Plugins.HybridCache/HybridCachePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ private static string GetLegacyDiskCachePhysicalPath(Config config)

private void LoadSettings(Config c)
{
_cacheOptions.DiskCacheDirectory = c.get("hybridCache.cacheLocation", _cacheOptions.DiskCacheDirectory);
_cacheOptions.DiskCacheDirectory = c.get("hybridCache.cacheLocation", ResolveCacheLocation(_cacheOptions.DiskCacheDirectory));
_cacheOptions.CacheSizeLimitInBytes = c.get("hybridCache.cacheMaxSizeBytes", _cacheOptions.CacheSizeLimitInBytes);
_cacheOptions.DatabaseShards = c.get("hybridCache.shardCount", _cacheOptions.DatabaseShards);
_cacheOptions.QueueSizeLimitInBytes = c.get("hybridCache.writeQueueLimitBytes", _cacheOptions.QueueSizeLimitInBytes);
_cacheOptions.MinCleanupBytes = c.get("hybridCache.minCleanupBytes", _cacheOptions.MinCleanupBytes);

// Resolve cache directory
_cacheOptions.DiskCacheDirectory = ResolveCacheLocation(_cacheOptions.DiskCacheDirectory);


if (FirstInstancePerPath.AddOrUpdate(DiskCacheDirectory, this, (k, v) => v) != this)
{
Expand Down Expand Up @@ -133,8 +137,7 @@ public IPlugin Install(Config c)
{
_c = c;
LoadSettings(c);
_cacheOptions.DiskCacheDirectory = ResolveCacheLocation(_cacheOptions.DiskCacheDirectory);




//OK, we have our cacheOptions;
Expand Down

0 comments on commit 134a83f

Please sign in to comment.