From 7c180e84d9a8cdfd9380fac0eab2d02a96ec18f3 Mon Sep 17 00:00:00 2001 From: Will Schurman Date: Wed, 1 Jul 2020 22:00:55 -0700 Subject: [PATCH] fix: fix stub cache key generation for global cache (#59) --- packages/entity/src/utils/testing/StubCacheAdapter.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/entity/src/utils/testing/StubCacheAdapter.ts b/packages/entity/src/utils/testing/StubCacheAdapter.ts index 0c879153..21f5ab85 100644 --- a/packages/entity/src/utils/testing/StubCacheAdapter.ts +++ b/packages/entity/src/utils/testing/StubCacheAdapter.ts @@ -118,6 +118,11 @@ class InMemoryFullCacheStubCacheAdapter extends EntityCacheAdapter(fieldName: N, fieldValue: TFields[N]): string { - return `${fieldName}:::${fieldValue}`; + return [ + this.entityConfiguration.tableName, + `v${this.entityConfiguration.cacheKeyVersion}`, + fieldName as string, + String(fieldValue), + ].join(':'); } }