CacheService
Home > @backstage/backend-plugin-api
> CacheService
A pre-configured, storage agnostic cache service suitable for use by Backstage plugins.
See the service documentation for more details.
Signature:
export interface CacheService
Methods
Method | Description |
---|---|
delete(key) | Removes the given key from the cache store. |
get(key) | Reads data from a cache store for the given key. If no data was found, returns undefined. |
set(key, value, options) | Writes the given data to a cache store, associated with the given key. An optional TTL may also be provided, otherwise it defaults to the TTL that was provided when the client was instantiated. |
withOptions(options) | Creates a new CacheService instance with the given options. |