Skip to content

Commit

Permalink
Merge pull request #5742 from valadas/settings-repository-cache
Browse files Browse the repository at this point in the history
Fixed an issue with settings caching using SettingsRepository
  • Loading branch information
mitchelsellers authored Jul 15, 2023
2 parents 71c696f + 0f8ed24 commit 773a7ef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected virtual string MappingCacheKey
/// <inheritdoc/>
public T GetSettings(ModuleInfo moduleContext)
{
return CBO.GetCachedObject<T>(new CacheItemArgs(this.CacheKey(moduleContext.TabModuleID), 20, CacheItemPriority.AboveNormal, moduleContext), this.Load, false);
return CBO.GetCachedObject<T>(new CacheItemArgs(this.CacheKey(moduleContext.PortalID), 20, CacheItemPriority.AboveNormal, moduleContext), this.Load, false);
}

/// <inheritdoc/>
Expand Down Expand Up @@ -164,7 +164,7 @@ private void SaveSettings(int portalId, ModuleInfo moduleContext, T settings)
}
}
});
DataCache.SetCache(this.CacheKey(moduleContext == null ? portalId : moduleContext.TabModuleID), settings);
DataCache.SetCache(this.CacheKey(portalId), settings);
}

private T Load(CacheItemArgs args)
Expand Down

0 comments on commit 773a7ef

Please # to comment.