@expo/entity-secondary-cache-redis 0.24.0 → 0.25.2
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.
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { EntityConfiguration, GenericSecondaryEntityCache } from '@expo/entity';
|
|
2
2
|
import { GenericRedisCacheContext } from '@expo/entity-cache-adapter-redis';
|
|
3
3
|
/**
|
|
4
|
-
* A
|
|
5
|
-
* single entity load. One common way this may be used is to add a second layer of caching in a hot path that makes
|
|
6
|
-
* a call to {@link EntityLoader.loadManyByFieldEqualityConjunctionAsync} is guaranteed to return at most one entity.
|
|
4
|
+
* A redis {@link GenericSecondaryEntityCache}.
|
|
7
5
|
*/
|
|
8
6
|
export default class RedisSecondaryEntityCache<TFields, TLoadParams> extends GenericSecondaryEntityCache<TFields, TLoadParams> {
|
|
9
7
|
constructor(entityConfiguration: EntityConfiguration<TFields>, genericRedisCacheContext: GenericRedisCacheContext, constructRedisKey: (params: Readonly<TLoadParams>) => string);
|
|
@@ -3,9 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const entity_1 = require("@expo/entity");
|
|
4
4
|
const entity_cache_adapter_redis_1 = require("@expo/entity-cache-adapter-redis");
|
|
5
5
|
/**
|
|
6
|
-
* A
|
|
7
|
-
* single entity load. One common way this may be used is to add a second layer of caching in a hot path that makes
|
|
8
|
-
* a call to {@link EntityLoader.loadManyByFieldEqualityConjunctionAsync} is guaranteed to return at most one entity.
|
|
6
|
+
* A redis {@link GenericSecondaryEntityCache}.
|
|
9
7
|
*/
|
|
10
8
|
class RedisSecondaryEntityCache extends entity_1.GenericSecondaryEntityCache {
|
|
11
9
|
constructor(entityConfiguration, genericRedisCacheContext, constructRedisKey) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RedisSecondaryEntityCache.js","sourceRoot":"","sources":["../src/RedisSecondaryEntityCache.ts"],"names":[],"mappings":";;AAAA,yCAAgF;AAChF,iFAAgG;AAEhG
|
|
1
|
+
{"version":3,"file":"RedisSecondaryEntityCache.js","sourceRoot":"","sources":["../src/RedisSecondaryEntityCache.ts"],"names":[],"mappings":";;AAAA,yCAAgF;AAChF,iFAAgG;AAEhG;;GAEG;AACH,MAAqB,yBAGnB,SAAQ,oCAAiD;IACzD,YACE,mBAAiD,EACjD,wBAAkD,EAClD,iBAA4D;QAE5D,KAAK,CAAC,IAAI,+CAAkB,CAAC,wBAAwB,EAAE,mBAAmB,CAAC,EAAE,iBAAiB,CAAC,CAAC;IAClG,CAAC;CACF;AAXD,4CAWC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/entity-secondary-cache-redis",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.2",
|
|
4
4
|
"description": "Redis secondary cache for @expo/entity",
|
|
5
5
|
"files": [
|
|
6
6
|
"build",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"ioredis": "^4.17.3"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@expo/entity": "^0.
|
|
38
|
-
"@expo/entity-cache-adapter-redis": "^0.
|
|
37
|
+
"@expo/entity": "^0.25.2",
|
|
38
|
+
"@expo/entity-cache-adapter-redis": "^0.25.2",
|
|
39
39
|
"nullthrows": "^1.1.1"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -2,9 +2,7 @@ import { EntityConfiguration, GenericSecondaryEntityCache } from '@expo/entity';
|
|
|
2
2
|
import { GenericRedisCacheContext, GenericRedisCacher } from '@expo/entity-cache-adapter-redis';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* A
|
|
6
|
-
* single entity load. One common way this may be used is to add a second layer of caching in a hot path that makes
|
|
7
|
-
* a call to {@link EntityLoader.loadManyByFieldEqualityConjunctionAsync} is guaranteed to return at most one entity.
|
|
5
|
+
* A redis {@link GenericSecondaryEntityCache}.
|
|
8
6
|
*/
|
|
9
7
|
export default class RedisSecondaryEntityCache<
|
|
10
8
|
TFields,
|