Skip to content

Commit

Permalink
fix: fix stub cache key generation for global cache (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
wschurman authored Jul 2, 2020
1 parent 1aa44e1 commit 7c180e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/entity/src/utils/testing/StubCacheAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ class InMemoryFullCacheStubCacheAdapter<TFields> extends EntityCacheAdapter<TFie
}

private createCacheKey<N extends keyof TFields>(fieldName: N, fieldValue: TFields[N]): string {
return `${fieldName}:::${fieldValue}`;
return [
this.entityConfiguration.tableName,
`v${this.entityConfiguration.cacheKeyVersion}`,
fieldName as string,
String(fieldValue),
].join(':');
}
}

0 comments on commit 7c180e8

Please sign in to comment.