@nestjs-redisx/cache 1.0.0
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.
- package/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/cache/api/decorators/cached.decorator.d.ts +152 -0
- package/dist/cache/api/decorators/cached.decorator.d.ts.map +1 -0
- package/dist/cache/api/decorators/invalidate-tags.decorator.d.ts +44 -0
- package/dist/cache/api/decorators/invalidate-tags.decorator.d.ts.map +1 -0
- package/dist/cache/application/ports/cache-service.port.d.ts +120 -0
- package/dist/cache/application/ports/cache-service.port.d.ts.map +1 -0
- package/dist/cache/application/ports/l1-cache-store.port.d.ts +56 -0
- package/dist/cache/application/ports/l1-cache-store.port.d.ts.map +1 -0
- package/dist/cache/application/ports/l2-cache-store.port.d.ts +98 -0
- package/dist/cache/application/ports/l2-cache-store.port.d.ts.map +1 -0
- package/dist/cache/application/services/cache-decorator-initializer.service.d.ts +25 -0
- package/dist/cache/application/services/cache-decorator-initializer.service.d.ts.map +1 -0
- package/dist/cache/application/services/cache.service.d.ts +106 -0
- package/dist/cache/application/services/cache.service.d.ts.map +1 -0
- package/dist/cache/application/services/warmup.service.d.ts +25 -0
- package/dist/cache/application/services/warmup.service.d.ts.map +1 -0
- package/dist/cache/domain/services/serializer.service.d.ts +29 -0
- package/dist/cache/domain/services/serializer.service.d.ts.map +1 -0
- package/dist/cache/domain/value-objects/cache-entry.vo.d.ts +69 -0
- package/dist/cache/domain/value-objects/cache-entry.vo.d.ts.map +1 -0
- package/dist/cache/domain/value-objects/cache-key.vo.d.ts +45 -0
- package/dist/cache/domain/value-objects/cache-key.vo.d.ts.map +1 -0
- package/dist/cache/domain/value-objects/tag.vo.d.ts +36 -0
- package/dist/cache/domain/value-objects/tag.vo.d.ts.map +1 -0
- package/dist/cache/domain/value-objects/tags.vo.d.ts +57 -0
- package/dist/cache/domain/value-objects/tags.vo.d.ts.map +1 -0
- package/dist/cache/domain/value-objects/ttl.vo.d.ts +58 -0
- package/dist/cache/domain/value-objects/ttl.vo.d.ts.map +1 -0
- package/dist/cache/infrastructure/adapters/l1-memory-store.adapter.d.ts +36 -0
- package/dist/cache/infrastructure/adapters/l1-memory-store.adapter.d.ts.map +1 -0
- package/dist/cache/infrastructure/adapters/l2-redis-store.adapter.d.ts +41 -0
- package/dist/cache/infrastructure/adapters/l2-redis-store.adapter.d.ts.map +1 -0
- package/dist/cache.plugin.d.ts +17 -0
- package/dist/cache.plugin.d.ts.map +1 -0
- package/dist/cache.service.d.ts +234 -0
- package/dist/cache.service.d.ts.map +1 -0
- package/dist/decorators/cache-evict.decorator.d.ts +97 -0
- package/dist/decorators/cache-evict.decorator.d.ts.map +1 -0
- package/dist/decorators/cache-put.decorator.d.ts +95 -0
- package/dist/decorators/cache-put.decorator.d.ts.map +1 -0
- package/dist/decorators/cache.interceptor.d.ts +63 -0
- package/dist/decorators/cache.interceptor.d.ts.map +1 -0
- package/dist/decorators/cacheable.decorator.d.ts +88 -0
- package/dist/decorators/cacheable.decorator.d.ts.map +1 -0
- package/dist/decorators/key-generator.util.d.ts +69 -0
- package/dist/decorators/key-generator.util.d.ts.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4199 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4152 -0
- package/dist/index.mjs.map +1 -0
- package/dist/invalidation/application/ports/event-invalidation.port.d.ts +28 -0
- package/dist/invalidation/application/ports/event-invalidation.port.d.ts.map +1 -0
- package/dist/invalidation/application/ports/invalidation-registry.port.d.ts +36 -0
- package/dist/invalidation/application/ports/invalidation-registry.port.d.ts.map +1 -0
- package/dist/invalidation/application/services/event-invalidation.service.d.ts +30 -0
- package/dist/invalidation/application/services/event-invalidation.service.d.ts.map +1 -0
- package/dist/invalidation/application/services/invalidation-registry.service.d.ts +17 -0
- package/dist/invalidation/application/services/invalidation-registry.service.d.ts.map +1 -0
- package/dist/invalidation/domain/entities/invalidation-rule.entity.d.ts +60 -0
- package/dist/invalidation/domain/entities/invalidation-rule.entity.d.ts.map +1 -0
- package/dist/invalidation/domain/value-objects/event-pattern.vo.d.ts +27 -0
- package/dist/invalidation/domain/value-objects/event-pattern.vo.d.ts.map +1 -0
- package/dist/invalidation/domain/value-objects/tag-template.vo.d.ts +34 -0
- package/dist/invalidation/domain/value-objects/tag-template.vo.d.ts.map +1 -0
- package/dist/invalidation/infrastructure/adapters/amqp-event-source.adapter.d.ts +51 -0
- package/dist/invalidation/infrastructure/adapters/amqp-event-source.adapter.d.ts.map +1 -0
- package/dist/invalidation/infrastructure/decorators/invalidate-on.decorator.d.ts +69 -0
- package/dist/invalidation/infrastructure/decorators/invalidate-on.decorator.d.ts.map +1 -0
- package/dist/key-builder.d.ts +199 -0
- package/dist/key-builder.d.ts.map +1 -0
- package/dist/serializers/index.d.ts +19 -0
- package/dist/serializers/index.d.ts.map +1 -0
- package/dist/serializers/json.serializer.d.ts +51 -0
- package/dist/serializers/json.serializer.d.ts.map +1 -0
- package/dist/serializers/msgpack.serializer.d.ts +67 -0
- package/dist/serializers/msgpack.serializer.d.ts.map +1 -0
- package/dist/serializers/serializer.interface.d.ts +36 -0
- package/dist/serializers/serializer.interface.d.ts.map +1 -0
- package/dist/shared/constants/index.d.ts +73 -0
- package/dist/shared/constants/index.d.ts.map +1 -0
- package/dist/shared/errors/index.d.ts +46 -0
- package/dist/shared/errors/index.d.ts.map +1 -0
- package/dist/shared/types/context-provider.interface.d.ts +58 -0
- package/dist/shared/types/context-provider.interface.d.ts.map +1 -0
- package/dist/shared/types/index.d.ts +259 -0
- package/dist/shared/types/index.d.ts.map +1 -0
- package/dist/stampede/application/ports/stampede-protection.port.d.ts +33 -0
- package/dist/stampede/application/ports/stampede-protection.port.d.ts.map +1 -0
- package/dist/stampede/infrastructure/stampede-protection.service.d.ts +30 -0
- package/dist/stampede/infrastructure/stampede-protection.service.d.ts.map +1 -0
- package/dist/strategies/eviction-strategy.interface.d.ts +39 -0
- package/dist/strategies/eviction-strategy.interface.d.ts.map +1 -0
- package/dist/strategies/fifo.strategy.d.ts +86 -0
- package/dist/strategies/fifo.strategy.d.ts.map +1 -0
- package/dist/strategies/index.d.ts +19 -0
- package/dist/strategies/index.d.ts.map +1 -0
- package/dist/strategies/lfu.strategy.d.ts +87 -0
- package/dist/strategies/lfu.strategy.d.ts.map +1 -0
- package/dist/strategies/lru.strategy.d.ts +78 -0
- package/dist/strategies/lru.strategy.d.ts.map +1 -0
- package/dist/swr/application/ports/swr-manager.port.d.ts +83 -0
- package/dist/swr/application/ports/swr-manager.port.d.ts.map +1 -0
- package/dist/swr/infrastructure/swr-manager.service.d.ts +30 -0
- package/dist/swr/infrastructure/swr-manager.service.d.ts.map +1 -0
- package/dist/tags/application/ports/tag-index.port.d.ts +55 -0
- package/dist/tags/application/ports/tag-index.port.d.ts.map +1 -0
- package/dist/tags/infrastructure/repositories/tag-index.repository.d.ts +37 -0
- package/dist/tags/infrastructure/repositories/tag-index.repository.d.ts.map +1 -0
- package/dist/tags/infrastructure/scripts/lua-scripts.d.ts +25 -0
- package/dist/tags/infrastructure/scripts/lua-scripts.d.ts.map +1 -0
- package/dist/tags/infrastructure/services/lua-script-loader.service.d.ts +44 -0
- package/dist/tags/infrastructure/services/lua-script-loader.service.d.ts.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lua-script-loader.service.d.ts","sourceRoot":"","sources":["../../../../src/tags/infrastructure/services/lua-script-loader.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAsB,YAAY,EAAU,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAgB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAYjE,qBACa,eAAgB,YAAW,YAAY;IAIhB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoC;IAC3D,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA6B;gBAEL,MAAM,EAAE,YAAY;IAEjE,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAInC;;OAEG;YACW,WAAW;IAiBzB;;;;;;;OAOG;IACG,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAU9F;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAI9C;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;CAGtC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nestjs-redisx/cache",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Advanced caching plugin for NestJS RedisX with L1+L2, anti-stampede, SWR, and tag invalidation",
|
|
5
|
+
"author": "NestJS RedisX Team",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"require": "./dist/index.js",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"default": "./dist/index.js"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"README.md",
|
|
20
|
+
"LICENSE"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsup",
|
|
24
|
+
"test": "SKIP_INTEGRATION=true vitest run",
|
|
25
|
+
"test:watch": "SKIP_INTEGRATION=true vitest",
|
|
26
|
+
"test:cov": "SKIP_INTEGRATION=true vitest run --coverage",
|
|
27
|
+
"test:integration": "vitest run test/integration/cache-with-redis.integration.spec.ts",
|
|
28
|
+
"test:integration:watch": "vitest watch test/integration/cache-with-redis.integration.spec.ts",
|
|
29
|
+
"docker:up": "docker-compose up -d",
|
|
30
|
+
"docker:down": "docker-compose down",
|
|
31
|
+
"docker:logs": "docker-compose logs -f redis",
|
|
32
|
+
"test:docker": "npm run docker:up && sleep 3 && npm run test:integration; TEST_EXIT=$?; npm run docker:down; exit $TEST_EXIT",
|
|
33
|
+
"test:all": "npm test && npm run test:integration",
|
|
34
|
+
"lint": "eslint \"{src,test}/**/*.ts\"",
|
|
35
|
+
"format": "prettier --write \"{src,test}/**/*.ts\""
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"nestjs",
|
|
39
|
+
"redis",
|
|
40
|
+
"cache",
|
|
41
|
+
"l1",
|
|
42
|
+
"l2",
|
|
43
|
+
"stampede",
|
|
44
|
+
"swr",
|
|
45
|
+
"tags",
|
|
46
|
+
"invalidation"
|
|
47
|
+
],
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "https://github.com/nestjs-redisx/nestjs-redisx.git",
|
|
51
|
+
"directory": "packages/cache"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://nestjs-redisx.dev/en/reference/cache/",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/nestjs-redisx/nestjs-redisx/issues"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"@nestjs-redisx/core": "^1.0.0",
|
|
59
|
+
"@nestjs/common": "^10.0.0",
|
|
60
|
+
"@nestjs/core": "^10.0.0",
|
|
61
|
+
"reflect-metadata": "^0.2.0",
|
|
62
|
+
"rxjs": "^7.8.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@nestjs/testing": "^10.0.0",
|
|
66
|
+
"@types/node": "^20.0.0",
|
|
67
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
68
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
69
|
+
"eslint": "^8.0.0",
|
|
70
|
+
"prettier": "^3.0.0",
|
|
71
|
+
"tsup": "^8.0.0",
|
|
72
|
+
"typescript": "^5.3.0",
|
|
73
|
+
"vitest": "^1.6.0",
|
|
74
|
+
"@vitest/coverage-v8": "^1.6.0"
|
|
75
|
+
},
|
|
76
|
+
"publishConfig": {
|
|
77
|
+
"access": "public"
|
|
78
|
+
}
|
|
79
|
+
}
|