@punks/backend-entity-manager 0.0.190 → 0.0.191

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,7 @@ export type CacheTtl = {
3
3
  unit: "years" | "months" | "days" | "hours" | "minutes" | "seconds";
4
4
  };
5
5
  export interface ICacheInstance {
6
+ getInstanceName(): string;
6
7
  getAll<T>(): Promise<T[]>;
7
8
  get<T>(key: string): Promise<T | undefined>;
8
9
  set<T>(key: string, input: {
@@ -5,6 +5,7 @@ export declare abstract class TypeormCacheInstance<TEntity extends ICacheDatabas
5
5
  protected readonly instanceName: string;
6
6
  private readonly logger;
7
7
  constructor(instanceName: string);
8
+ getInstanceName(): string;
8
9
  retrieve<T>(key: string, input: {
9
10
  ttl: CacheTtl;
10
11
  valueFactory: () => Promise<T>;
package/dist/esm/index.js CHANGED
@@ -2330,6 +2330,9 @@ class TypeormCacheInstance {
2330
2330
  this.instanceName = instanceName;
2331
2331
  this.logger = Log.getLogger(`TypeOrm Cache Instance ${instanceName}`);
2332
2332
  }
2333
+ getInstanceName() {
2334
+ return this.instanceName;
2335
+ }
2333
2336
  async retrieve(key, input) {
2334
2337
  const item = await this.getRepository().findOne({
2335
2338
  where: {