Don't warn when parsing storeOptions for 'memory' cache
Currently, a fresh Backstage installation prints the following warning at app startup: "backstage warn No configuration found for cache store 'memory' at 'backend.cache.memory'. type="cacheManager"" The 'memory' cache store does not have any extra config, like 'redis' or 'infinispan'. Warning about missing configuration can cause confusion to the users. See config here: https://github.com/backstage/backstage/blob/master/packages/backend-defaults/config.d.ts#L623 This warning was introduced here: https://github.com/backstage/backstage/pull/30743/files#diff-42975462070406316e4534ce0579d1d12d54fc5cd62e239d1ae676c1e290b473R137 Signed-off-by: Valério Valério <vdv100@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-defaults': minor
|
||||
---
|
||||
|
||||
Don't warn when parsing storeOptions for 'memory' cache
|
||||
@@ -134,7 +134,7 @@ export class CacheManager {
|
||||
): CacheStoreOptions | undefined {
|
||||
const storeConfigPath = `backend.cache.${store}`;
|
||||
|
||||
if (!config.has(storeConfigPath)) {
|
||||
if (store !== 'memory' && !config.has(storeConfigPath)) {
|
||||
logger?.warn(
|
||||
`No configuration found for cache store '${store}' at '${storeConfigPath}'.`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user