Open ericis opened 2 months ago
Hi @ericis ππ» , you can import CacheManager
from the @backstage-defaults/cache
subpath, here is an example:
import { CacheManager } from "@backstage-defaults/cache";
And you can call the CacheManager.forPlugin
method to get a CacheService
for a plugin.
Hi @ericis ππ» , you can import
CacheManager
from the@backstage-defaults/cache
subpath, here is an example:import { CacheManager } from "@backstage-defaults/cache";
And you can call the
CacheManager.forPlugin
method to get aCacheService
for a plugin.
Hey, I think the import should be:
import { CacheManager } from "@backstage/backend-defaults/cache";
π Description
Incorrect deprecation recommendations
Use of
PluginCacheManager
from the "@backstage/backend-common" package includes an invalid deprecation warning to:https://backstage.io/docs/reference/backend-common.plugincachemanager/
The "@backstage/backend-common" package also contains the deprecated
CacheManager
that recommends:https://backstage.io/docs/reference/backend-common.cachemanager/
However, the "@backstage/backend-defaults" package does not contain a
PluginCacheManager
orCacheManager
.https://backstage.io/docs/reference/backend-defaults/
Example of a correct deprecation recommendation
The "@backstage/backend-common" package also includes the deprecated
cacheToPluginCacheManager()
function and recommends:https://backstage.io/docs/reference/backend-common.cachetoplugincachemanager/
*Note: this deprecation message could probably also benefit from noting that it is in the "@backstage/backend-plugin-api" package.
π Expected behavior
Clearer deprecation notices that are possible to take action on.
π Actual Behavior with Screenshots
See links and descriptions in bug report.
π Reproduction steps
n/a
π Provide the context for the Bug.
n/a
π₯οΈ Your Environment
n/a
π Have you spent some time to check if this bug has been raised before?
π’ Have you read the Code of Conduct?
Are you willing to submit PR?
No, I don't have time to work on this right now