Skip to content

Commit

Permalink
refactor(platform-cache): remove deprecated PlatformCacheLegacyStoreF…
Browse files Browse the repository at this point in the history
…actory interface

BREAKING CHANGE: remove deprecated PlatformCacheLegacyStoreFactory interface. Use FactoryStore instead
  • Loading branch information
Romakita committed Sep 11, 2024
1 parent 59a680b commit c8bf779
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/platform/platform-cache/src/interfaces/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import type {BaseContext} from "@tsed/di";
import type {Cache, CachingConfig, Store} from "cache-manager";
import {FactoryStore} from "cache-manager/dist/caching";
import type {FactoryStore} from "cache-manager/dist/caching";
import type {CacheManager} from "../services/PlatformCache.js";

/**
* @deprecated Since 2022-11. Use FactoryStore instead.
*/
export type PlatformCacheLegacyStoreFactory = {
create(...args: any[]): Promise<Store | any> | Store | any;
};

export type PlatformCacheSettings<Config extends Record<string, any> = any, S extends Store = any> = CachingConfig<Config> & {
caches?: Cache[];
store?: "memory" | Store | PlatformCacheLegacyStoreFactory | FactoryStore<S, Config>;
store?: "memory" | Store | FactoryStore<S, Config>;
max?: number;
keyResolver?: (args: any[], ctx: BaseContext) => string;
prefix?: string;
Expand Down

0 comments on commit c8bf779

Please sign in to comment.