@revealui/cache 0.2.1 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +22 -1
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,3 +1,11 @@
1
+ ---
2
+ title: "@revealui/cache"
3
+ description: "Caching infrastructure for RevealUI applications. Provides CDN cache configuration, edge cache helpers, ISR presets, tag-based revalidation, and rate limiting at the edge."
4
+ visibility: public
5
+ status: verified
6
+ audience: user
7
+ ---
8
+
1
9
  # @revealui/cache
2
10
 
3
11
  Caching infrastructure for RevealUI applications. Provides CDN cache configuration, edge cache helpers, ISR presets, tag-based revalidation, and rate limiting at the edge.
@@ -18,7 +26,7 @@ If you're caching in-memory data within a single request, use standard `Map` or
18
26
  pnpm add @revealui/cache
19
27
  ```
20
28
 
21
- Optional peer dependency: `next` (>=14.0.0) - required for ISR helpers.
29
+ No peer dependencies. ISR helpers use structural typing compatible with `NextRequest`/`NextResponse`, Hono, and Cloudflare Workers - no `next` package required.
22
30
 
23
31
  ## API Reference
24
32
 
@@ -69,12 +77,25 @@ Optional peer dependency: `next` (>=14.0.0) - required for ISR helpers.
69
77
  | `getABTestVariant` | Function | Deterministic A/B test variant assignment |
70
78
  | `getPersonalizationConfig` | Function | Edge personalization based on geo/device |
71
79
 
80
+ ### Invalidation Channel
81
+
82
+ | Export | Type | Purpose |
83
+ |--------|------|---------|
84
+ | `CacheInvalidationChannel` | Class | Distributed cache busting via pub/sub channel |
85
+
72
86
  ### Configuration
73
87
 
74
88
  | Export | Type | Purpose |
75
89
  |--------|------|---------|
76
90
  | `configureCacheLogger` | Function | Set custom logger (defaults to console) |
77
91
 
92
+ ### Subpath Exports
93
+
94
+ | Subpath | Contents |
95
+ |---------|----------|
96
+ | `@revealui/cache` | All cache utilities |
97
+ | `@revealui/cache/adapters` | `CacheStore` interface + implementations (for custom backends) |
98
+
78
99
  ## Design Principles
79
100
 
80
101
  - **Adaptive**: ISR presets scale from real-time (10s) to immutable (1y) based on content volatility
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@revealui/cache",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Framework-agnostic CDN config, edge cache, ISR-style presets, and revalidation helpers. Compatible with NextRequest/NextResponse, Hono, and Cloudflare Workers via structural typing — no `next` peer dep.",
5
5
  "license": "MIT",
6
6
  "dependencies": {
7
- "@revealui/security": "0.4.0"
7
+ "@revealui/security": "0.4.1"
8
8
  },
9
9
  "devDependencies": {
10
- "@electric-sql/pglite": "^0.4.5",
11
- "@types/node": "^25.6.0",
10
+ "@electric-sql/pglite": "^0.5.1",
11
+ "@types/node": "^25.9.1",
12
12
  "tsup": "^8.5.1",
13
13
  "typescript": "^6.0.3",
14
- "vitest": "^4.1.5",
14
+ "vitest": "^4.1.8",
15
15
  "@revealui/dev": "0.1.0"
16
16
  },
17
17
  "engines": {