@omnitron-dev/titan-cache 0.4.6 → 0.4.8

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.
Files changed (2) hide show
  1. package/README.md +25 -7
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,19 +1,37 @@
1
1
  # @omnitron-dev/titan-cache
2
2
 
3
- > Multi-tier caching module for the Titan framework
3
+ Configurable caching for Titan services, with in-memory policies and optional multiple tiers.
4
4
 
5
- Part of the [Omni](../../README.md) monorepo — Fullstack Type-Safe RPC Framework.
5
+ ## Capabilities
6
6
 
7
- ## Installation
7
+ - LRU, LFU and TTL behavior.
8
+ - Named caches, cache decorators and statistics.
9
+ - Optional compression and an application-supplied second-tier adapter.
8
10
 
9
- ```bash
11
+ ## Quick start
12
+
13
+ ```sh
10
14
  pnpm add @omnitron-dev/titan-cache
11
15
  ```
12
16
 
13
- ## Overview
17
+ ```ts
18
+ import { TitanCacheModule } from '@omnitron-dev/titan-cache';
19
+
20
+ export const cache = TitanCacheModule.forRoot({
21
+ maxSize: 1000,
22
+ defaultTtl: 300,
23
+ evictionPolicy: 'lru',
24
+ });
25
+ ```
26
+
27
+ Add this dynamic module to the `imports` of an existing Titan application.
28
+
29
+ Configure the second-tier client explicitly when sharing cache state between processes. Cache entries are derived data; applications own invalidation and access-sensitive cache keys.
30
+
31
+ ## Documentation
14
32
 
15
- Pluggable caching module supporting LRU, LFU, and TTL eviction strategies. Integrates with Titan's DI system and can be backed by in-memory stores or Redis.
33
+ [Public API](src/index.ts) · [Package exports](package.json) · [Omni](../../README.md)
16
34
 
17
35
  ## License
18
36
 
19
- MIT
37
+ [MIT](../../LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnitron-dev/titan-cache",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "Multi-tier caching module for Titan framework (LRU, LFU, TTL)",
5
5
  "author": "LuxQuant",
6
6
  "license": "MIT",
@@ -17,15 +17,15 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
- "@omnitron-dev/eventemitter": "0.4.6",
20
+ "@omnitron-dev/eventemitter": "0.4.8",
21
21
  "msgpackr": "^2.1.3",
22
22
  "reflect-metadata": "^0.2.2"
23
23
  },
24
24
  "peerDependencies": {
25
- "@omnitron-dev/titan": "0.4.6"
25
+ "@omnitron-dev/titan": "0.4.8"
26
26
  },
27
27
  "devDependencies": {
28
- "@omnitron-dev/titan": "0.4.6",
28
+ "@omnitron-dev/titan": "0.4.8",
29
29
  "@types/node": "26.6.6",
30
30
  "typescript": "npm:@typescript/typescript6@^6.0.2",
31
31
  "vitest": "^5.0.5",
@@ -36,7 +36,7 @@
36
36
  "url": "git+https://github.com/omnitron-dev/omni.git",
37
37
  "directory": "packages/titan-cache"
38
38
  },
39
- "gitHead": "3a912fa181e97ddd238a28bb355cd7445c1b7364",
39
+ "gitHead": "1ae8568eebc2581e2cc2428bd3ca1cf570ed3f03",
40
40
  "scripts": {
41
41
  "build": "../../scripts/build-package.sh -p ./tsconfig.json",
42
42
  "test": "vitest run",