mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-26 07:20:39 +00:00
6afc6e9e05
refactor(cache): extract package cache backend classes
18 lines
393 B
TypeScript
18 lines
393 B
TypeScript
import type { PackageCacheNamespace } from '../types.ts';
|
|
|
|
export abstract class PackageCacheBase {
|
|
abstract get<T = unknown>(
|
|
namespace: PackageCacheNamespace,
|
|
key: string,
|
|
): Promise<T | undefined>;
|
|
|
|
abstract set(
|
|
namespace: PackageCacheNamespace,
|
|
key: string,
|
|
value: unknown,
|
|
hardTtlMinutes: number,
|
|
): Promise<void>;
|
|
|
|
abstract destroy(): Promise<void>;
|
|
}
|