0.35.0 • Published 1 month ago
@expo/entity-secondary-cache-redis v0.35.0
@expo/entity-secondary-cache-redis
ioredis secondary cache for @expo/entity
.
Usage
- Create a concrete implementation of abstract class
EntitySecondaryCacheLoader
, in this exampleTestEntitySecondaryCacheLoader
. The underlying data can come from anywhere, but an entity is constructed from the data and then authorized for the viewer. - Create an instance of your
EntitySecondaryCacheLoader
, passing in aRedisSecondaryEntityCache
.const secondaryCacheLoader = new TestSecondaryRedisCacheLoader( new RedisSecondaryEntityCache( redisTestEntityConfiguration, genericRedisCacheContext, (loadParams) => `${loadParams.id}` ), RedisTestEntity.loader(viewerContext) );
- Load entities through it:
const loadParams = { id: createdEntity.getID() }; const results = await secondaryCacheLoader.loadManyAsync([loadParams]);
0.35.0
1 month ago
0.34.0
1 month ago
0.33.0
7 months ago
0.32.0
11 months ago
0.31.1
1 year ago
0.31.0
1 year ago
0.30.0
1 year ago
0.29.0
2 years ago
0.28.0
2 years ago
0.27.0
2 years ago
0.26.1
2 years ago
0.26.0
2 years ago
0.21.0
2 years ago
0.20.0
2 years ago
0.25.3
2 years ago
0.25.2
2 years ago
0.25.1
2 years ago
0.25.0
2 years ago
0.24.0
2 years ago
0.23.0
2 years ago
0.22.0
2 years ago
0.19.0
3 years ago
0.18.0
3 years ago
0.17.0
3 years ago
0.16.0
3 years ago
0.15.0
3 years ago