diff --git a/src/core/classes/site.ts b/src/core/classes/site.ts index 20dc8f448..082a4f0f2 100644 --- a/src/core/classes/site.ts +++ b/src/core/classes/site.ts @@ -1404,6 +1404,7 @@ export class CoreSite { getFromCache: true, saveToCache: true, emergencyCache: true, + cacheKey: this.getPublicConfigCacheKey(), ...CoreSites.getReadingStrategyPreSets(options.readingStrategy), }; @@ -1466,6 +1467,15 @@ export class CoreSite { } } + /** + * Get cache key for getPublicConfig WS calls. + * + * @return Cache key. + */ + protected getPublicConfigCacheKey(): string { + return 'tool_mobile_get_public_config'; + } + /** * Perform a request to the server to get the public config of this site. * diff --git a/src/core/features/siteplugins/services/siteplugins.ts b/src/core/features/siteplugins/services/siteplugins.ts index b9bb33a80..567799359 100644 --- a/src/core/features/siteplugins/services/siteplugins.ts +++ b/src/core/features/siteplugins/services/siteplugins.ts @@ -302,13 +302,25 @@ export class CoreSitePluginsProvider { const data = await site.read( 'tool_mobile_get_plugins_supporting_mobile', {}, - { getFromCache: false }, + { + getFromCache: false, + cacheKey: this.getPluginsCacheKey(), + }, ); // Return enabled plugins. return data.plugins.filter((plugin) => this.isSitePluginEnabled(plugin, site)); } + /** + * Get cache key for get plugins WS call. + * + * @return Cache key. + */ + protected getPluginsCacheKey(): string { + return ROOT_CACHE_KEY + 'plugins'; + } + /** * Get a site plugin handler. *