Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed an issue with settings caching using SettingsRepository #5742

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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