File tree 3 files changed +18
-17
lines changed
3 files changed +18
-17
lines changed Original file line number Diff line number Diff line change @@ -40,16 +40,16 @@ jobs:
40
40
- run : npm run lint
41
41
- run : ./scripts/example-check.sh
42
42
43
- # publish:
44
- # needs: ["test", "lint"]
45
- # runs-on: ubuntu-latest
46
-
47
- # steps:
48
- # - uses: actions/checkout@v4
49
- # - uses: actions/setup-node@v4
50
- # with:
51
- # node-version: 20
52
- # - run: npm ci
53
- # - uses: JS-DevTools/npm-publish@v1
54
- # with:
55
- # token: ${{ secrets.NPM_TOKEN }}
43
+ publish :
44
+ needs : ["test", "lint"]
45
+ runs-on : ubuntu-latest
46
+
47
+ steps :
48
+ - uses : actions/checkout@v4
49
+ - uses : actions/setup-node@v4
50
+ with :
51
+ node-version : 20
52
+ - run : npm ci
53
+ - uses : JS-DevTools/npm-publish@v1
54
+ with :
55
+ token : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -15,9 +15,11 @@ const logger = createLogger();
15
15
const redisClient = new Redis ();
16
16
17
17
const cache = new Cache (
18
- " users:{userId}" ,
19
- // Caches will be checked in order, and the first cache to return a value
20
- // will be used
18
+ // Keys should be prefixed with the project name to make them unique across
19
+ // all of LOKE
20
+ " foo-service:users:fetch:{userId}" ,
21
+ // Cache stores will be checked in order, and the first cache to return a
22
+ // value will be used
21
23
[new LruMemoryCacheStore ({ max: 1000 }), new RedisCacheStore (redisClient )],
22
24
logger ,
23
25
);
Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ export class RedisCacheStore<T> implements CacheStore<T> {
44
44
const buf = Buffer . from ( JSON . stringify ( record ) , "utf8" ) ;
45
45
46
46
if ( this . keyTemplate !== null ) {
47
- // JS UTF-16 is 2 bytes per char, 🤞redis client isn't using utf8
48
47
cacheValueSize . observe ( { key : this . keyTemplate } , buf . length ) ;
49
48
}
50
49
You can’t perform that action at this time.
0 commit comments