clarify when cache key should be bumped

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2021-09-24 13:54:40 +02:00
parent 47dece5e3b
commit f775ce3264
@@ -196,12 +196,13 @@ import {
} from '@backstage/plugin-catalog-backend';
import { CatalogProcessorParser } from '.';
// Change this key to if the processor has undergone major changes
// and the existing cache data is no longer compatible.
// It's recommended to always bump the CACHE_KEY version if you make
// changes to the processor implementation or CacheItem.
const CACHE_KEY = 'v1';
// CacheItem is our cache containing ETag used in the upstream request
// as well as the processing result used when the Etag matches.
// Bump the CACHE_KEY version if you make any changes to this type.
type CacheItem = {
etag: string;
entity: Entity;