tricache 0.8.0 → 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/README.md +10 -4
- package/dashboards/prometheus-scrape.yml +18 -0
- package/dist/{cache-service-5MZXFIGK.js → cache-service-26GCO3UU.js} +3 -3
- package/dist/{cache-service-CyLdpo77.d.ts → cache-service-pJ-nFcVj.d.ts} +44 -12
- package/dist/{chunk-XZL45ABR.js → chunk-2AJKEQMZ.js} +54 -1
- package/dist/{chunk-6PQ5MOWR.js → chunk-7SZSQS55.js} +571 -115
- package/dist/chunk-BQRURGGD.js +60 -0
- package/dist/chunk-IITRFWHY.js +196 -0
- package/dist/{chunk-LJ5QJB5O.js → chunk-UBWLPKTI.js} +127 -11
- package/dist/cli.cjs +767 -133
- package/dist/cli.js +24 -6
- package/dist/dashboard/index.d.ts +2 -2
- package/dist/drizzle/index.cjs +734 -132
- package/dist/drizzle/index.d.ts +2 -2
- package/dist/drizzle/index.js +1 -1
- package/dist/edge/index.cjs +163 -46
- package/dist/edge/index.d.ts +3 -3
- package/dist/edge/index.js +42 -14
- package/dist/hono/index.cjs +8093 -0
- package/dist/hono/index.d.ts +91 -0
- package/dist/hono/index.js +185 -0
- package/dist/{hono-DQRS1Xd7.d.ts → hono-DuNvciyq.d.ts} +6 -5
- package/dist/http/index.cjs +833 -170
- package/dist/http/index.d.ts +6 -30
- package/dist/http/index.js +9 -59
- package/dist/index.cjs +755 -130
- package/dist/index.d.ts +35 -6
- package/dist/index.js +16 -6
- package/dist/nestjs/index.cjs +725 -130
- package/dist/nestjs/index.d.ts +2 -2
- package/dist/nestjs/index.js +4 -4
- package/dist/next/index.cjs +725 -130
- package/dist/next/index.d.ts +2 -2
- package/dist/next/index.js +3 -3
- package/dist/prisma/index.d.ts +2 -2
- package/dist/serialize-worker.cjs +127 -9
- package/dist/serialize-worker.js +8 -4
- package/dist/{types-B6krw64X.d.ts → types-5HXqBfAf.d.ts} +74 -7
- package/dist/utils-CEsU_Z0s.d.ts +27 -0
- package/package.json +22 -9
- package/src/cache-service.ts +540 -68
- package/src/cli.ts +21 -4
- package/src/compression.ts +193 -15
- package/src/cross-region.ts +1 -1
- package/src/edge/cache.ts +38 -11
- package/src/edge/hono.ts +123 -42
- package/src/env.d.ts +13 -0
- package/src/hono/index.ts +316 -0
- package/src/http/index.ts +5 -0
- package/src/index.ts +9 -1
- package/src/ipc-telemetry.ts +29 -1
- package/src/serialize-worker.ts +6 -2
- package/src/types.ts +68 -5
- package/src/utils/tag-matcher.ts +90 -0
- package/dist/chunk-ZTSWCFYO.js +0 -135
- /package/dist/{chunk-QNU7B43J.js → chunk-VXFTFZ5N.js} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CacheService, I as IIpcCacheProvider, a as IpcMetricsPayload, b as IpcTelemetryClient, c as IpcTelemetryServer, L as LatencyWatchdogOptions, d as LatencyWatchdogTelemetry, P as ProcessTerminationBus, T as TierLatencyWatchdog, e as deepMergeOptions, f as findActiveSockets, g as formatBytes, h as formatDuration, i as formatNumber, r as renderProgressBar, j as renderTopDashboard, k as resolveIpcSocketPath } from './cache-service-
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
export { C as CacheService, I as IIpcCacheProvider, a as IpcMetricsPayload, b as IpcTelemetryClient, c as IpcTelemetryServer, L as LatencyWatchdogOptions, d as LatencyWatchdogTelemetry, P as ProcessTerminationBus, T as TierLatencyWatchdog, e as deepMergeOptions, f as findActiveSockets, g as formatBytes, h as formatDuration, i as formatNumber, r as renderProgressBar, j as renderTopDashboard, k as resolveIpcSocketPath } from './cache-service-pJ-nFcVj.js';
|
|
2
|
+
import { j as IRemoteSnapshotAdapter, k as CategoryLimit, S as SmartCacheEntry, l as EvictionReason, i as ILogger, m as CacheHit, f as CachePriority, h as WTinyLfuStats$1, n as CacheEncryption, o as CompressionAlgorithm, p as DiskCacheEntry, D as DiskBackpressureStats, q as IRedisDriver, r as IRedisPipeline } from './types-5HXqBfAf.js';
|
|
3
|
+
export { c as CacheHealthStatus, b as CacheMetrics, C as CacheOptions, g as CachePingResult, d as CachePresetType, e as CrossRegionInvalidationEvent, s as CrossRegionRelayOptions, t as CustomCompressor, E as EncryptionMode, u as EnvelopeEncryption, v as EnvelopeEncryptionOptions, H as HttpMeshRelayOptions, w as HttpSnapshotAdapterOptions, x as ICacheBatchObservableCallback, y as ICacheCounter, z as ICacheMeter, A as ICacheObservableGauge, B as ICacheSpan, F as ICacheSpanLink, I as ICacheTracer, G as ICrossRegionRelay, a as InvalidateTagOptions, L as LockOptions, R as RemoteSnapshotOptions, J as WebhookRequestLike, K as WebhookResponseLike, W as WrapOptions, M as consoleLogger, N as createCrossRegionWebhookHandler, O as createCustomCrossRegionRelay, P as createCustomSnapshotAdapter, Q as createHttpMeshRelay, T as createHttpSnapshotAdapter, U as createMemoryCrossRegionRelay, V as createMemorySnapshotAdapter, X as initZstd } from './types-5HXqBfAf.js';
|
|
4
4
|
export { B as BloomFilterStats, M as Murmur3BloomFilter, W as WasmBloomFilter, m as murmur3_32 } from './murmur3-CMGw9PbV.js';
|
|
5
5
|
import { EventEmitter } from 'node:events';
|
|
6
6
|
export { DashboardActionEvent, DashboardOptions, DashboardPeerInstance, StandaloneDashboardOptions, createNextDashboardHandlers, handleDashboardRequest, startDashboardServer, tricacheDashboard } from './dashboard/index.js';
|
|
@@ -556,8 +556,6 @@ declare class WTinyLfuPolicy {
|
|
|
556
556
|
getSegment(key: string): 'window' | 'probation' | 'protected' | null;
|
|
557
557
|
}
|
|
558
558
|
|
|
559
|
-
type CompressionAlgorithm = 'brotli' | 'gzip' | 'none';
|
|
560
|
-
|
|
561
559
|
/**
|
|
562
560
|
* DiskTier — L1.5 NVMe-fast overflow cache between L1 RAM and L2 Redis/DB.
|
|
563
561
|
*
|
|
@@ -942,4 +940,35 @@ declare function parseTraceParent(header: string | undefined | null): ParsedTrac
|
|
|
942
940
|
*/
|
|
943
941
|
declare function formatTraceParent(traceId: string, spanId: string, traceFlags?: number): string;
|
|
944
942
|
|
|
945
|
-
|
|
943
|
+
/**
|
|
944
|
+
* Utilities for wildcard matching and hierarchical cascading of cache tags.
|
|
945
|
+
*/
|
|
946
|
+
/**
|
|
947
|
+
* Returns true if the given tag contains glob wildcard characters ('*' or '?').
|
|
948
|
+
*/
|
|
949
|
+
declare function isWildcardTag(tag: string): boolean;
|
|
950
|
+
/**
|
|
951
|
+
* Matches a tag name against a pattern supporting '*' (0 or more chars) and '?' (single char).
|
|
952
|
+
* Optimized with fast-paths for exact match, universal wildcard, and single prefix/suffix wildcards.
|
|
953
|
+
*/
|
|
954
|
+
declare function matchesTagPattern(pattern: string, tag: string): boolean;
|
|
955
|
+
/**
|
|
956
|
+
* Determines whether `candidateTag` is either identical to `parentTag`
|
|
957
|
+
* or a child descendant in the hierarchy separated by `delimiter`.
|
|
958
|
+
*
|
|
959
|
+
* Example:
|
|
960
|
+
* isChildTag('org:123', 'org:123', ':') -> true
|
|
961
|
+
* isChildTag('org:123', 'org:123:dept', ':') -> true
|
|
962
|
+
* isChildTag('org:123', 'org:1234', ':') -> false (must match delimiter boundary)
|
|
963
|
+
*/
|
|
964
|
+
declare function isChildTag(parentTag: string, candidateTag: string, delimiter?: string): boolean;
|
|
965
|
+
/**
|
|
966
|
+
* Expands hierarchical tags into all ancestor namespace levels.
|
|
967
|
+
*
|
|
968
|
+
* Example:
|
|
969
|
+
* expandHierarchicalTags(['org:123:dept:456', 'role:admin'], ':')
|
|
970
|
+
* => ['org', 'org:123', 'org:123:dept', 'org:123:dept:456', 'role', 'role:admin']
|
|
971
|
+
*/
|
|
972
|
+
declare function expandHierarchicalTags(tags: string[], delimiter?: string): string[];
|
|
973
|
+
|
|
974
|
+
export { AutoPipeliner, type AutoPipelinerOptions, type AutonomousL1Options, CacheCodec, type CacheCodecOptions, CacheEncryption, CacheHit, CachePriority, CategoryLimit, CompressionAlgorithm, DEFAULT_AUTONOMOUS_L1_CEILING_BYTES, DiskCacheEntry, DiskTier, EvictionReason, type EvictionResult, ILogger, IRedisDriver, IRedisPipeline, IRemoteSnapshotAdapter, MIN_AUTONOMOUS_L1_FLOOR_BYTES, NodeRedisAdapter, type ParsedTraceParent, SigV4SnapshotAdapter, type SigV4SnapshotAdapterOptions, SmartCacheEntry, SmartMemoryCache, TinyLfuSketch, WTinyLfuCache, type WTinyLfuOptions, WTinyLfuPolicy, type WTinyLfuStats, createNodeRedisAdapter, createR2SnapshotAdapter, createS3SnapshotAdapter, createSigV4SnapshotAdapter, defaultCodec, expandHierarchicalTags, formatTraceParent, getV8HeapLimit, isChildTag, isWildcardTag, matchesTagPattern, parseTraceParent, readCgroupMemoryLimit, resolveAutonomousL1MaxBytes, resolveDefaultDiskDir };
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
createSigV4SnapshotAdapter,
|
|
15
15
|
formatTraceParent,
|
|
16
16
|
parseTraceParent
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VXFTFZ5N.js";
|
|
18
18
|
import {
|
|
19
19
|
AutoPipeliner,
|
|
20
20
|
CacheCodec,
|
|
@@ -43,13 +43,14 @@ import {
|
|
|
43
43
|
resolveAutonomousL1MaxBytes,
|
|
44
44
|
resolveDefaultDiskDir,
|
|
45
45
|
resolveIpcSocketPath
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-7SZSQS55.js";
|
|
47
47
|
import {
|
|
48
48
|
CacheEncryption,
|
|
49
49
|
CachePriority,
|
|
50
50
|
EnvelopeEncryption,
|
|
51
|
-
consoleLogger
|
|
52
|
-
|
|
51
|
+
consoleLogger,
|
|
52
|
+
initZstd
|
|
53
|
+
} from "./chunk-UBWLPKTI.js";
|
|
53
54
|
import {
|
|
54
55
|
createNextDashboardHandlers,
|
|
55
56
|
handleDashboardRequest,
|
|
@@ -61,8 +62,12 @@ import {
|
|
|
61
62
|
murmur3_32
|
|
62
63
|
} from "./chunk-UGD4VEPD.js";
|
|
63
64
|
import {
|
|
64
|
-
WasmBloomFilter
|
|
65
|
-
|
|
65
|
+
WasmBloomFilter,
|
|
66
|
+
expandHierarchicalTags,
|
|
67
|
+
isChildTag,
|
|
68
|
+
isWildcardTag,
|
|
69
|
+
matchesTagPattern
|
|
70
|
+
} from "./chunk-2AJKEQMZ.js";
|
|
66
71
|
export {
|
|
67
72
|
AutoPipeliner,
|
|
68
73
|
CacheCodec,
|
|
@@ -100,6 +105,7 @@ export {
|
|
|
100
105
|
createSigV4SnapshotAdapter,
|
|
101
106
|
deepMergeOptions,
|
|
102
107
|
defaultCodec,
|
|
108
|
+
expandHierarchicalTags,
|
|
103
109
|
findActiveSockets,
|
|
104
110
|
formatBytes,
|
|
105
111
|
formatDuration,
|
|
@@ -107,6 +113,10 @@ export {
|
|
|
107
113
|
formatTraceParent,
|
|
108
114
|
getV8HeapLimit,
|
|
109
115
|
handleDashboardRequest,
|
|
116
|
+
initZstd,
|
|
117
|
+
isChildTag,
|
|
118
|
+
isWildcardTag,
|
|
119
|
+
matchesTagPattern,
|
|
110
120
|
murmur3_32,
|
|
111
121
|
parseTraceParent,
|
|
112
122
|
readCgroupMemoryLimit,
|