@breadstone/archipel-mcp 0.0.23 → 0.0.25
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/data/guides/caching.md +33 -0
- package/data/guides/email-delivery.md +27 -1
- package/data/guides/esigning-integration.md +11 -5
- package/data/guides/health-indicators.md +220 -0
- package/data/guides/index.md +2 -0
- package/data/guides/queue-infrastructure.md +329 -0
- package/data/guides/telemetry-and-observability.md +20 -0
- package/data/packages/platform-analytics/api/Class.AnalyticsClientPort.md +20 -0
- package/data/packages/platform-analytics/api/Class.AnalyticsHealthIndicator.md +78 -0
- package/data/packages/platform-analytics/api/Class.AppInsightsAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.DatadogAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.NoopAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/Class.SentryAnalyticsClient.md +24 -0
- package/data/packages/platform-analytics/api/index.md +1 -0
- package/data/packages/platform-analytics/index.md +25 -1
- package/data/packages/platform-authentication/api/Class.AuthenticationHealthIndicator.md +68 -0
- package/data/packages/platform-authentication/api/index.md +1 -0
- package/data/packages/platform-authentication/index.md +25 -1
- package/data/packages/platform-blob-storage/api/Class.BlobHealthIndicator.md +7 -7
- package/data/packages/platform-blob-storage/api/Class.BlobModule.md +2 -2
- package/data/packages/platform-blob-storage/api/Interface.IAwsS3BlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IAzureBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IBlobModuleOptions.md +5 -5
- package/data/packages/platform-blob-storage/api/Interface.ICustomBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/Interface.IVercelBlobProviderRegistration.md +3 -3
- package/data/packages/platform-blob-storage/api/TypeAlias.IBlobProviderRegistration.md +1 -1
- package/data/packages/platform-blob-storage/api/index.md +1 -1
- package/data/packages/platform-blob-storage/index.md +19 -14
- package/data/packages/platform-caching/api/Class.MemoryLayeredCache.md +10 -10
- package/data/packages/platform-caching/api/Class.NoopCacheMetricsRecorder.md +6 -6
- package/data/packages/platform-caching/api/Class.RedisLayeredCache.md +10 -10
- package/data/packages/platform-caching/api/Interface.ILayeredCache.md +9 -9
- package/data/packages/platform-caching/api/Interface.ILayeredCacheOptions.md +6 -6
- package/data/packages/platform-caching/api/Variable.CACHE_DEFAULT_TTL_MS.md +14 -0
- package/data/packages/platform-caching/api/Variable.CACHE_MAX_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.CACHE_STALE_WHILE_REVALIDATE.md +14 -0
- package/data/packages/platform-caching/api/Variable.PLATFORM_CACHING_CONFIG_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_CONFIG_ENTRIES.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_KEY_PREFIX.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_TTL_SECONDS.md +14 -0
- package/data/packages/platform-caching/api/Variable.REDIS_URL.md +14 -0
- package/data/packages/platform-caching/api/index.md +13 -0
- package/data/packages/platform-caching/index.md +47 -1
- package/data/packages/platform-configuration/api/Function.createConfigKey.md +1 -1
- package/data/packages/platform-core/api/Class.HttpLoggerMiddleware.md +3 -3
- package/data/packages/platform-core/api/Function.maskSensitive.md +26 -0
- package/data/packages/platform-core/api/Function.maskSensitiveFields.md +26 -0
- package/data/packages/platform-core/api/index.md +2 -0
- package/data/packages/platform-core/index.md +11 -0
- package/data/packages/platform-database/api/Class.DatabaseHealthIndicator.md +8 -6
- package/data/packages/platform-database/api/Class.DatabaseModule.md +3 -3
- package/data/packages/platform-database/api/Class.RepositoryBase.md +20 -20
- package/data/packages/platform-database/api/Function.paginator.md +1 -1
- package/data/packages/platform-database/api/Interface.IDatabaseModuleConfig.md +3 -3
- package/data/packages/platform-database/api/TypeAlias.DelegateArgs.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.DelegateReturnTypes.md +1 -1
- package/data/packages/platform-database/api/TypeAlias.PaginateFunction.md +1 -1
- package/data/packages/platform-database/api/Variable.DATABASE_MODULE_CONFIG.md +1 -1
- package/data/packages/platform-database/index.md +17 -5
- package/data/packages/platform-documents/api/Class.DocumentEngine.md +9 -5
- package/data/packages/platform-documents/index.md +1 -1
- package/data/packages/platform-esigning/api/Class.AdobeSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.DocuSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.DropboxSignEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/Class.EsigningClientPort.md +20 -0
- package/data/packages/platform-esigning/api/Class.EsigningHealthIndicator.md +78 -0
- package/data/packages/platform-esigning/api/Class.InternalEsigningProvider.md +24 -0
- package/data/packages/platform-esigning/api/index.md +1 -0
- package/data/packages/platform-esigning/index.md +26 -2
- package/data/packages/platform-health/api/Class.HealthModule.md +42 -0
- package/data/packages/platform-health/api/Class.HealthOrchestrator.md +64 -0
- package/data/packages/platform-health/api/Interface.IHealthCheckResult.md +46 -0
- package/data/packages/platform-health/api/Interface.IHealthIndicator.md +41 -0
- package/data/packages/platform-health/api/Variable.HEALTH_INDICATORS_TOKEN.md +14 -0
- package/data/packages/platform-health/api/index.md +26 -0
- package/data/packages/platform-health/index.md +18 -7
- package/data/packages/platform-intelligence/api/Class.IntelligenceHealthIndicator.md +78 -0
- package/data/packages/platform-intelligence/api/index.md +1 -0
- package/data/packages/platform-intelligence/index.md +24 -1
- package/data/packages/platform-logging/api/Class.ContextLogger.md +152 -0
- package/data/packages/platform-logging/api/Class.LoggerModule.md +8 -2
- package/data/packages/platform-logging/api/Class.RequestContextStore.md +90 -0
- package/data/packages/platform-logging/api/Class.RequestIdMiddleware.md +68 -0
- package/data/packages/platform-logging/api/Interface.IRequestContext.md +34 -0
- package/data/packages/platform-logging/api/Variable.REQUEST_ID_HEADER.md +14 -0
- package/data/packages/platform-logging/api/index.md +11 -1
- package/data/packages/platform-logging/index.md +89 -7
- package/data/packages/platform-mailing/api/Class.MailHealthIndicator.md +5 -5
- package/data/packages/platform-mailing/api/Class.MailModule.md +28 -1
- package/data/packages/platform-mailing/api/Class.MailVerificationService.md +49 -16
- package/data/packages/platform-mailing/api/Class.SmtpConnectionVerifier.md +84 -0
- package/data/packages/platform-mailing/api/Interface.IMailModuleOptions.md +36 -0
- package/data/packages/platform-mailing/api/index.md +3 -1
- package/data/packages/platform-mailing/index.md +64 -8
- package/data/packages/platform-mapping/api/Class.MappingBuilder.md +110 -0
- package/data/packages/platform-mapping/api/Class.MappingError.md +56 -0
- package/data/packages/platform-mapping/api/Class.MappingModule.md +46 -0
- package/data/packages/platform-mapping/api/Class.MappingNotRegisteredError.md +52 -0
- package/data/packages/platform-mapping/api/Class.MappingProfileBase.md +52 -0
- package/data/packages/platform-mapping/api/Class.MappingService.md +284 -0
- package/data/packages/platform-mapping/api/Class.TypeMappingNotRegisteredError.md +53 -0
- package/data/packages/platform-mapping/api/Function.createMappingKey.md +39 -0
- package/data/packages/platform-mapping/api/Interface.IMappingBuilder.md +76 -0
- package/data/packages/platform-mapping/api/Interface.IMappingKey.md +58 -0
- package/data/packages/platform-mapping/api/Interface.IMappingProfile.md +32 -0
- package/data/packages/platform-mapping/api/TypeAlias.Constructor.md +28 -0
- package/data/packages/platform-mapping/api/index.md +38 -0
- package/data/packages/platform-mcp/api/Class.McpHealthIndicator.md +78 -0
- package/data/packages/platform-mcp/api/index.md +1 -0
- package/data/packages/platform-mcp/index.md +24 -1
- package/data/packages/platform-openapi/api/Function.SwaggerFeature.md +2 -2
- package/data/packages/platform-openapi/api/Function.getSwaggerFeatureMetadata.md +2 -2
- package/data/packages/platform-payments/api/Class.LemonSqueezyClient.md +24 -0
- package/data/packages/platform-payments/api/Class.MollieClient.md +24 -0
- package/data/packages/platform-payments/api/Class.PaddleClient.md +24 -0
- package/data/packages/platform-payments/api/Class.PaymentClientPort.md +20 -0
- package/data/packages/platform-payments/api/Class.PaymentHealthIndicator.md +78 -0
- package/data/packages/platform-payments/api/Class.StripeClient.md +28 -4
- package/data/packages/platform-payments/api/index.md +1 -0
- package/data/packages/platform-payments/index.md +26 -2
- package/data/packages/platform-queue/api/Class.AzureQueue.md +221 -0
- package/data/packages/platform-queue/api/Class.BullMqQueue.md +220 -0
- package/data/packages/platform-queue/api/Class.MemoryQueue.md +194 -0
- package/data/packages/platform-queue/api/Class.QueueError.md +51 -0
- package/data/packages/platform-queue/api/Class.QueueHealthIndicator.md +68 -0
- package/data/packages/platform-queue/api/Class.QueueJobNotFoundError.md +43 -0
- package/data/packages/platform-queue/api/Class.QueueJobStateError.md +48 -0
- package/data/packages/platform-queue/api/Class.QueueValidationError.md +43 -0
- package/data/packages/platform-queue/api/Interface.IAzureQueueOptions.md +48 -0
- package/data/packages/platform-queue/api/Interface.IBullMqQueueOptions.md +45 -0
- package/data/packages/platform-queue/api/Interface.IMemoryQueueOptions.md +32 -0
- package/data/packages/platform-queue/api/Interface.IQueue.md +173 -0
- package/data/packages/platform-queue/api/Interface.IQueueJob.md +139 -0
- package/data/packages/platform-queue/api/TypeAlias.QueueJobStatus.md +14 -0
- package/data/packages/platform-queue/api/Variable.AZURE_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.AZURE_CONNECTION_STRING.md +14 -0
- package/data/packages/platform-queue/api/Variable.AZURE_RECEIVE_WAIT_MS.md +21 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_PREFIX.md +18 -0
- package/data/packages/platform-queue/api/Variable.BULLMQ_REDIS_URL.md +21 -0
- package/data/packages/platform-queue/api/Variable.PLATFORM_QUEUE_CONFIG_ENTRIES.md +17 -0
- package/data/packages/platform-queue/api/Variable.QUEUE_JOB_STATUS.md +30 -0
- package/data/packages/platform-queue/api/Variable.QUEUE_MAX_JOBS.md +21 -0
- package/data/packages/platform-queue/api/index.md +49 -0
- package/data/packages/platform-queue/index.md +168 -0
- package/data/packages/platform-resources/api/Class.BlobResourceStrategy.md +195 -0
- package/data/packages/platform-resources/api/Class.EmbeddedResourceStrategy.md +215 -0
- package/data/packages/platform-resources/api/Class.FileResourceStrategy.md +190 -0
- package/data/packages/platform-resources/api/Class.ResourceManager.md +477 -0
- package/data/packages/platform-resources/api/Class.ResourceModule.md +46 -0
- package/data/packages/platform-resources/api/Class.ResourceNotFoundError.md +60 -0
- package/data/packages/platform-resources/api/Interface.IBlobResourceStrategyConfig.md +28 -0
- package/data/packages/platform-resources/api/Interface.IBlobServiceAdapter.md +40 -0
- package/data/packages/platform-resources/api/Interface.IFileResourceStrategyConfig.md +72 -0
- package/data/packages/platform-resources/api/Interface.IResourceManagerConfig.md +89 -0
- package/data/packages/platform-resources/api/Interface.IResourceMetadata.md +94 -0
- package/data/packages/platform-resources/api/Interface.IResourceResult.md +34 -0
- package/data/packages/platform-resources/api/Interface.IResourceStrategy.md +134 -0
- package/data/packages/platform-resources/api/index.md +29 -0
- package/data/packages/platform-telemetry/api/Class.OtelSdkHolder.md +20 -2
- package/data/packages/platform-telemetry/api/Class.TelemetryHealthIndicator.md +78 -0
- package/data/packages/platform-telemetry/api/index.md +1 -0
- package/data/packages/platform-telemetry/index.md +25 -1
- package/data/patterns/config-pattern.md +3 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: platform-blob-storage
|
|
3
3
|
description: Cloud file storage abstraction with pluggable providers and optional metadata persistence.
|
|
4
4
|
order: 3
|
|
5
|
-
tags: [blob-storage, files, upload, download, vercel, azure, aws, s3, providers, ports-and-adapters]
|
|
5
|
+
tags: [blob-storage, files, upload, download, vercel, azure, aws, s3, providers, ports-and-adapters, health]
|
|
6
6
|
package: '@breadstone/archipel-platform-blob-storage'
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -267,7 +267,7 @@ BlobModule.forRoot({
|
|
|
267
267
|
|
|
268
268
|
> **\*** `accessKeyId` and `secretAccessKey` must be provided **together**. Omit both to use the default AWS credential chain (IAM roles, instance profiles, environment variables).
|
|
269
269
|
|
|
270
|
-
The provider supports pre-signed URLs and lazy-loads the AWS SDK for tree-shaking.
|
|
270
|
+
The provider supports pre-signed URLs and lazy-loads the AWS SDK for tree-shaking. `downloadObject()` gracefully handles JSON parse errors, returning the raw response body when content cannot be parsed.
|
|
271
271
|
|
|
272
272
|
### Custom Provider
|
|
273
273
|
|
|
@@ -305,20 +305,24 @@ BlobModule.forRoot({
|
|
|
305
305
|
|
|
306
306
|
## Health Check
|
|
307
307
|
|
|
308
|
-
The `BlobHealthIndicator`
|
|
308
|
+
The `BlobHealthIndicator` pings the configured blob storage URL via HTTP. If no URL is configured, it reports `disabled: true`. Import it from the `/health` subpath:
|
|
309
309
|
|
|
310
310
|
```typescript
|
|
311
|
-
import { BlobHealthIndicator } from '@breadstone/archipel-platform-blob-storage';
|
|
311
|
+
import { BlobHealthIndicator } from '@breadstone/archipel-platform-blob-storage/health';
|
|
312
|
+
import { HealthModule } from '@breadstone/archipel-platform-health';
|
|
312
313
|
|
|
313
|
-
@
|
|
314
|
-
|
|
315
|
-
|
|
314
|
+
@Module({
|
|
315
|
+
imports: [
|
|
316
|
+
BlobModule.forRoot({ /* ... */ }),
|
|
317
|
+
HealthModule.withIndicators([BlobHealthIndicator]),
|
|
318
|
+
],
|
|
319
|
+
})
|
|
320
|
+
export class AppModule {}
|
|
321
|
+
```
|
|
316
322
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
}
|
|
323
|
+
| Key | Check | Dependencies |
|
|
324
|
+
| --- | ----- | ------------ |
|
|
325
|
+
| `blob` | HTTP ping to blob URL (or disabled if unconfigured) | `ConfigService`, `HttpHealthIndicator` |
|
|
322
326
|
```
|
|
323
327
|
|
|
324
328
|
---
|
|
@@ -329,10 +333,11 @@ Each provider is tree-shakeable via sub-path imports:
|
|
|
329
333
|
|
|
330
334
|
| Import Path | Contents |
|
|
331
335
|
| --------------------------------------------------- | ----------------------------------------------------- |
|
|
332
|
-
| `@breadstone/archipel-platform-blob-storage` | Core module, service, ports,
|
|
336
|
+
| `@breadstone/archipel-platform-blob-storage` | Core module, service, ports, interfaces |
|
|
333
337
|
| `@breadstone/archipel-platform-blob-storage/vercel` | VercelBlobProvider, VERCEL_BLOB_PROVIDER_OPTIONS |
|
|
334
338
|
| `@breadstone/archipel-platform-blob-storage/azure` | AzureBlobProvider, AZURE_BLOB_PROVIDER_OPTIONS |
|
|
335
339
|
| `@breadstone/archipel-platform-blob-storage/aws-s3` | AwsS3BlobProvider, AWS_S3_PROVIDER_OPTIONS |
|
|
340
|
+
| `@breadstone/archipel-platform-blob-storage/health` | BlobHealthIndicator |
|
|
336
341
|
|
|
337
342
|
---
|
|
338
343
|
|
|
@@ -347,7 +352,7 @@ Each provider is tree-shakeable via sub-path imports:
|
|
|
347
352
|
| `VercelBlobProvider` | Provider | Vercel Blob implementation (sub-path) |
|
|
348
353
|
| `AzureBlobProvider` | Provider | Azure Blob Storage implementation (sub-path) |
|
|
349
354
|
| `AwsS3BlobProvider` | Provider | AWS S3 implementation (sub-path) |
|
|
350
|
-
| `BlobHealthIndicator` | Health |
|
|
355
|
+
| `BlobHealthIndicator` | Health | Blob storage health check (`/health` subpath) |
|
|
351
356
|
| `IBlobProvider` | Interface | Custom provider contract |
|
|
352
357
|
| `BlobProviderKinds` | Constant | `'vercel'` \| `'azure'` \| `'aws-s3'` \| `'custom'` |
|
|
353
358
|
| `BlobDownloadResponseTypes` | Constant | `'arraybuffer'` \| `'json'` \| `'stream'` \| `'text'` |
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: MemoryLayeredCache\<TKey, TValue\>
|
|
7
7
|
|
|
8
|
-
Defined in: [MemoryLayeredCache.ts:72](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L72)
|
|
8
|
+
Defined in: [memory/MemoryLayeredCache.ts:72](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L72)
|
|
9
9
|
|
|
10
10
|
In-memory layered cache with LRU eviction, TTL expiration and
|
|
11
11
|
optional stale-while-revalidate support. Falls back to an
|
|
@@ -30,7 +30,7 @@ asynchronous loader function on cache misses.
|
|
|
30
30
|
new MemoryLayeredCache<TKey, TValue>(loadFn, options?): MemoryLayeredCache<TKey, TValue>;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [MemoryLayeredCache.ts:97](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L97)
|
|
33
|
+
Defined in: [memory/MemoryLayeredCache.ts:97](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L97)
|
|
34
34
|
|
|
35
35
|
Initializes a new instance of the MemoryLayeredCache class.
|
|
36
36
|
|
|
@@ -53,7 +53,7 @@ Initializes a new instance of the MemoryLayeredCache class.
|
|
|
53
53
|
get(key): TValue | undefined;
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
Defined in: [MemoryLayeredCache.ts:109](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L109)
|
|
56
|
+
Defined in: [memory/MemoryLayeredCache.ts:109](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L109)
|
|
57
57
|
|
|
58
58
|
Retrieves a value from the cache synchronously.
|
|
59
59
|
|
|
@@ -81,7 +81,7 @@ The cached value or `undefined` on a miss.
|
|
|
81
81
|
getAsync(key): Promise<TValue | undefined>;
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
Defined in: [MemoryLayeredCache.ts:130](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L130)
|
|
84
|
+
Defined in: [memory/MemoryLayeredCache.ts:130](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L130)
|
|
85
85
|
|
|
86
86
|
Retrieves a value from the cache asynchronously.
|
|
87
87
|
|
|
@@ -109,7 +109,7 @@ A promise resolving to the cached value or `undefined` on a miss.
|
|
|
109
109
|
invalidate(key): void;
|
|
110
110
|
```
|
|
111
111
|
|
|
112
|
-
Defined in: [MemoryLayeredCache.ts:176](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L176)
|
|
112
|
+
Defined in: [memory/MemoryLayeredCache.ts:176](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L176)
|
|
113
113
|
|
|
114
114
|
Invalidates a key in the cache synchronously.
|
|
115
115
|
|
|
@@ -135,7 +135,7 @@ Invalidates a key in the cache synchronously.
|
|
|
135
135
|
invalidateAsync(key): Promise<void>;
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
Defined in: [MemoryLayeredCache.ts:181](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L181)
|
|
138
|
+
Defined in: [memory/MemoryLayeredCache.ts:181](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L181)
|
|
139
139
|
|
|
140
140
|
Invalidates a key in the cache asynchronously.
|
|
141
141
|
|
|
@@ -161,7 +161,7 @@ Invalidates a key in the cache asynchronously.
|
|
|
161
161
|
set(key, value): void;
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
Defined in: [MemoryLayeredCache.ts:152](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L152)
|
|
164
|
+
Defined in: [memory/MemoryLayeredCache.ts:152](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L152)
|
|
165
165
|
|
|
166
166
|
Stores a value in the cache synchronously.
|
|
167
167
|
|
|
@@ -188,7 +188,7 @@ Stores a value in the cache synchronously.
|
|
|
188
188
|
setAsync(key, value): Promise<void>;
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
Defined in: [MemoryLayeredCache.ts:161](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L161)
|
|
191
|
+
Defined in: [memory/MemoryLayeredCache.ts:161](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L161)
|
|
192
192
|
|
|
193
193
|
Stores a value in the cache asynchronously.
|
|
194
194
|
|
|
@@ -215,7 +215,7 @@ Stores a value in the cache asynchronously.
|
|
|
215
215
|
stats(): ICacheStats;
|
|
216
216
|
```
|
|
217
217
|
|
|
218
|
-
Defined in: [MemoryLayeredCache.ts:186](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L186)
|
|
218
|
+
Defined in: [memory/MemoryLayeredCache.ts:186](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L186)
|
|
219
219
|
|
|
220
220
|
Returns current cache statistics.
|
|
221
221
|
|
|
@@ -237,7 +237,7 @@ The cache statistics snapshot.
|
|
|
237
237
|
warm(key): Promise<TValue | undefined>;
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
Defined in: [MemoryLayeredCache.ts:170](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L170)
|
|
240
|
+
Defined in: [memory/MemoryLayeredCache.ts:170](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L170)
|
|
241
241
|
|
|
242
242
|
Proactively warms the cache for a given key.
|
|
243
243
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Class: NoopCacheMetricsRecorder
|
|
7
7
|
|
|
8
|
-
Defined in: [NoopCacheMetricsRecorder.ts:13](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/NoopCacheMetricsRecorder.ts#L13)
|
|
8
|
+
Defined in: [metrics/noop/NoopCacheMetricsRecorder.ts:13](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/metrics/noop/NoopCacheMetricsRecorder.ts#L13)
|
|
9
9
|
|
|
10
10
|
No-op implementation of [ICacheMetricsRecorder](Interface.ICacheMetricsRecorder) used as the default
|
|
11
11
|
when no external metrics backend is configured.
|
|
@@ -34,7 +34,7 @@ new NoopCacheMetricsRecorder(): NoopCacheMetricsRecorder;
|
|
|
34
34
|
optional recordEviction(_cache): void;
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
Defined in: [NoopCacheMetricsRecorder.ts:37](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/NoopCacheMetricsRecorder.ts#L37)
|
|
37
|
+
Defined in: [metrics/noop/NoopCacheMetricsRecorder.ts:37](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/metrics/noop/NoopCacheMetricsRecorder.ts#L37)
|
|
38
38
|
|
|
39
39
|
Records a cache eviction.
|
|
40
40
|
|
|
@@ -60,7 +60,7 @@ Records a cache eviction.
|
|
|
60
60
|
recordHit(_cache): void;
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
Defined in: [NoopCacheMetricsRecorder.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/NoopCacheMetricsRecorder.ts#L17)
|
|
63
|
+
Defined in: [metrics/noop/NoopCacheMetricsRecorder.ts:17](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/metrics/noop/NoopCacheMetricsRecorder.ts#L17)
|
|
64
64
|
|
|
65
65
|
Records a cache hit.
|
|
66
66
|
|
|
@@ -86,7 +86,7 @@ Records a cache hit.
|
|
|
86
86
|
recordLoadError(_cache): void;
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
Defined in: [NoopCacheMetricsRecorder.ts:32](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/NoopCacheMetricsRecorder.ts#L32)
|
|
89
|
+
Defined in: [metrics/noop/NoopCacheMetricsRecorder.ts:32](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/metrics/noop/NoopCacheMetricsRecorder.ts#L32)
|
|
90
90
|
|
|
91
91
|
Records a failed cache load.
|
|
92
92
|
|
|
@@ -112,7 +112,7 @@ Records a failed cache load.
|
|
|
112
112
|
recordLoadSuccess(_cache): void;
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
-
Defined in: [NoopCacheMetricsRecorder.ts:27](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/NoopCacheMetricsRecorder.ts#L27)
|
|
115
|
+
Defined in: [metrics/noop/NoopCacheMetricsRecorder.ts:27](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/metrics/noop/NoopCacheMetricsRecorder.ts#L27)
|
|
116
116
|
|
|
117
117
|
Records a successful cache load.
|
|
118
118
|
|
|
@@ -138,7 +138,7 @@ Records a successful cache load.
|
|
|
138
138
|
recordMiss(_cache): void;
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
Defined in: [NoopCacheMetricsRecorder.ts:22](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/NoopCacheMetricsRecorder.ts#L22)
|
|
141
|
+
Defined in: [metrics/noop/NoopCacheMetricsRecorder.ts:22](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/metrics/noop/NoopCacheMetricsRecorder.ts#L22)
|
|
142
142
|
|
|
143
143
|
Records a cache miss.
|
|
144
144
|
|
|
@@ -35,7 +35,7 @@ is inherently asynchronous. Use the `*Async` variants instead.
|
|
|
35
35
|
new RedisLayeredCache<TKey, TValue>(loadFn, options): RedisLayeredCache<TKey, TValue>;
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
38
|
+
Defined in: [redis/RedisLayeredCache.ts:108](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L108)
|
|
39
39
|
|
|
40
40
|
Initializes a new instance of the RedisLayeredCache class.
|
|
41
41
|
|
|
@@ -58,7 +58,7 @@ Initializes a new instance of the RedisLayeredCache class.
|
|
|
58
58
|
get(key): TValue | undefined;
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
61
|
+
Defined in: [redis/RedisLayeredCache.ts:125](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L125)
|
|
62
62
|
|
|
63
63
|
Not supported - Redis is inherently asynchronous.
|
|
64
64
|
|
|
@@ -88,7 +88,7 @@ Always throws. Use [getAsync](#getasync) instead.
|
|
|
88
88
|
getAsync(key): Promise<TValue | undefined>;
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
91
|
+
Defined in: [redis/RedisLayeredCache.ts:130](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L130)
|
|
92
92
|
|
|
93
93
|
Retrieves a value from the cache asynchronously.
|
|
94
94
|
|
|
@@ -116,7 +116,7 @@ A promise resolving to the cached value or `undefined` on a miss.
|
|
|
116
116
|
invalidate(key): void;
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
119
|
+
Defined in: [redis/RedisLayeredCache.ts:209](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L209)
|
|
120
120
|
|
|
121
121
|
Not supported - Redis is inherently asynchronous.
|
|
122
122
|
|
|
@@ -146,7 +146,7 @@ Always throws. Use [invalidateAsync](#invalidateasync) instead.
|
|
|
146
146
|
invalidateAsync(key): Promise<void>;
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
149
|
+
Defined in: [redis/RedisLayeredCache.ts:216](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L216)
|
|
150
150
|
|
|
151
151
|
Invalidates a key in the cache asynchronously.
|
|
152
152
|
|
|
@@ -172,7 +172,7 @@ Invalidates a key in the cache asynchronously.
|
|
|
172
172
|
onModuleDestroy(): Promise<void>;
|
|
173
173
|
```
|
|
174
174
|
|
|
175
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
175
|
+
Defined in: [redis/RedisLayeredCache.ts:237](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L237)
|
|
176
176
|
|
|
177
177
|
Gracefully disconnects the Redis client when the NestJS module is destroyed.
|
|
178
178
|
|
|
@@ -194,7 +194,7 @@ OnModuleDestroy.onModuleDestroy
|
|
|
194
194
|
set(key, value): void;
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
197
|
+
Defined in: [redis/RedisLayeredCache.ts:183](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L183)
|
|
198
198
|
|
|
199
199
|
Not supported - Redis is inherently asynchronous.
|
|
200
200
|
|
|
@@ -225,7 +225,7 @@ Always throws. Use [setAsync](#setasync) instead.
|
|
|
225
225
|
setAsync(key, value): Promise<void>;
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
228
|
+
Defined in: [redis/RedisLayeredCache.ts:188](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L188)
|
|
229
229
|
|
|
230
230
|
Stores a value in the cache asynchronously.
|
|
231
231
|
|
|
@@ -252,7 +252,7 @@ Stores a value in the cache asynchronously.
|
|
|
252
252
|
stats(): ICacheStats;
|
|
253
253
|
```
|
|
254
254
|
|
|
255
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
255
|
+
Defined in: [redis/RedisLayeredCache.ts:225](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L225)
|
|
256
256
|
|
|
257
257
|
Returns current cache statistics.
|
|
258
258
|
|
|
@@ -274,7 +274,7 @@ The cache statistics snapshot.
|
|
|
274
274
|
warm(key): Promise<TValue | undefined>;
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
Defined in: [redis/RedisLayeredCache.ts:
|
|
277
|
+
Defined in: [redis/RedisLayeredCache.ts:200](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/RedisLayeredCache.ts#L200)
|
|
278
278
|
|
|
279
279
|
Proactively warms the cache for a given key.
|
|
280
280
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Interface: ILayeredCache\<TKey, TValue\>
|
|
7
7
|
|
|
8
|
-
Defined in: [ILayeredCache.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L15)
|
|
8
|
+
Defined in: [interfaces/ILayeredCache.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L15)
|
|
9
9
|
|
|
10
10
|
Generic layered cache contract supporting synchronous and asynchronous
|
|
11
11
|
access patterns with optional warm-up and statistics.
|
|
@@ -25,7 +25,7 @@ access patterns with optional warm-up and statistics.
|
|
|
25
25
|
get(key): TValue | undefined;
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
Defined in: [ILayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L25)
|
|
28
|
+
Defined in: [interfaces/ILayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L25)
|
|
29
29
|
|
|
30
30
|
Retrieves a value from the cache synchronously.
|
|
31
31
|
|
|
@@ -49,7 +49,7 @@ The cached value or `undefined` on a miss.
|
|
|
49
49
|
getAsync(key): Promise<TValue | undefined>;
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
Defined in: [ILayeredCache.ts:34](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L34)
|
|
52
|
+
Defined in: [interfaces/ILayeredCache.ts:34](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L34)
|
|
53
53
|
|
|
54
54
|
Retrieves a value from the cache asynchronously.
|
|
55
55
|
|
|
@@ -73,7 +73,7 @@ A promise resolving to the cached value or `undefined` on a miss.
|
|
|
73
73
|
invalidate(key): void;
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
Defined in: [ILayeredCache.ts:69](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L69)
|
|
76
|
+
Defined in: [interfaces/ILayeredCache.ts:69](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L69)
|
|
77
77
|
|
|
78
78
|
Invalidates a key in the cache synchronously.
|
|
79
79
|
|
|
@@ -95,7 +95,7 @@ Invalidates a key in the cache synchronously.
|
|
|
95
95
|
invalidateAsync(key): Promise<void>;
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
Defined in: [ILayeredCache.ts:77](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L77)
|
|
98
|
+
Defined in: [interfaces/ILayeredCache.ts:77](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L77)
|
|
99
99
|
|
|
100
100
|
Invalidates a key in the cache asynchronously.
|
|
101
101
|
|
|
@@ -117,7 +117,7 @@ Invalidates a key in the cache asynchronously.
|
|
|
117
117
|
set(key, value): void;
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
Defined in: [ILayeredCache.ts:43](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L43)
|
|
120
|
+
Defined in: [interfaces/ILayeredCache.ts:43](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L43)
|
|
121
121
|
|
|
122
122
|
Stores a value in the cache synchronously.
|
|
123
123
|
|
|
@@ -140,7 +140,7 @@ Stores a value in the cache synchronously.
|
|
|
140
140
|
setAsync(key, value): Promise<void>;
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
Defined in: [ILayeredCache.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L52)
|
|
143
|
+
Defined in: [interfaces/ILayeredCache.ts:52](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L52)
|
|
144
144
|
|
|
145
145
|
Stores a value in the cache asynchronously.
|
|
146
146
|
|
|
@@ -163,7 +163,7 @@ Stores a value in the cache asynchronously.
|
|
|
163
163
|
optional stats(): ICacheStats;
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
Defined in: [ILayeredCache.ts:85](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L85)
|
|
166
|
+
Defined in: [interfaces/ILayeredCache.ts:85](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L85)
|
|
167
167
|
|
|
168
168
|
Returns current cache statistics.
|
|
169
169
|
|
|
@@ -181,7 +181,7 @@ The cache statistics snapshot.
|
|
|
181
181
|
optional warm(key): Promise<TValue | undefined>;
|
|
182
182
|
```
|
|
183
183
|
|
|
184
|
-
Defined in: [ILayeredCache.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/ILayeredCache.ts#L61)
|
|
184
|
+
Defined in: [interfaces/ILayeredCache.ts:61](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/interfaces/ILayeredCache.ts#L61)
|
|
185
185
|
|
|
186
186
|
Proactively warms the cache for a given key.
|
|
187
187
|
|
|
@@ -5,7 +5,7 @@ editUrl: false
|
|
|
5
5
|
---
|
|
6
6
|
# Interface: ILayeredCacheOptions
|
|
7
7
|
|
|
8
|
-
Defined in: [MemoryLayeredCache.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L16)
|
|
8
|
+
Defined in: [memory/MemoryLayeredCache.ts:16](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L16)
|
|
9
9
|
|
|
10
10
|
Configuration options for [MemoryLayeredCache](Class.MemoryLayeredCache).
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ Configuration options for [MemoryLayeredCache](Class.MemoryLayeredCache).
|
|
|
17
17
|
optional cacheName?: string;
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Defined in: [MemoryLayeredCache.ts:57](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L57)
|
|
20
|
+
Defined in: [memory/MemoryLayeredCache.ts:57](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L57)
|
|
21
21
|
|
|
22
22
|
An optional name / label for the cache instance, used in metrics.
|
|
23
23
|
Defaults to `'memory'`.
|
|
@@ -30,7 +30,7 @@ Defaults to `'memory'`.
|
|
|
30
30
|
optional maxEntries?: number;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Defined in: [MemoryLayeredCache.ts:41](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L41)
|
|
33
|
+
Defined in: [memory/MemoryLayeredCache.ts:41](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L41)
|
|
34
34
|
|
|
35
35
|
Maximum number of entries retained in the cache. Oldest entries are
|
|
36
36
|
evicted first (LRU). Defaults to infinite.
|
|
@@ -43,7 +43,7 @@ evicted first (LRU). Defaults to infinite.
|
|
|
43
43
|
optional metricsRecorder?: ICacheMetricsRecorder;
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
Defined in: [MemoryLayeredCache.ts:49](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L49)
|
|
46
|
+
Defined in: [memory/MemoryLayeredCache.ts:49](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L49)
|
|
47
47
|
|
|
48
48
|
Optional metrics recorder forwarded cache operation statistics.
|
|
49
49
|
Falls back to [NoopCacheMetricsRecorder](Class.NoopCacheMetricsRecorder) when omitted.
|
|
@@ -56,7 +56,7 @@ Falls back to [NoopCacheMetricsRecorder](Class.NoopCacheMetricsRecorder) when om
|
|
|
56
56
|
optional staleWhileRevalidate?: boolean;
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
Defined in: [MemoryLayeredCache.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L33)
|
|
59
|
+
Defined in: [memory/MemoryLayeredCache.ts:33](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L33)
|
|
60
60
|
|
|
61
61
|
When `true`, expired entries are served immediately while a background
|
|
62
62
|
refresh is triggered. Defaults to `false`.
|
|
@@ -69,7 +69,7 @@ refresh is triggered. Defaults to `false`.
|
|
|
69
69
|
optional ttlMs?: number;
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
Defined in: [MemoryLayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/MemoryLayeredCache.ts#L25)
|
|
72
|
+
Defined in: [memory/MemoryLayeredCache.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/memory/MemoryLayeredCache.ts#L25)
|
|
73
73
|
|
|
74
74
|
Time to live in milliseconds. Entries older than this are considered expired.
|
|
75
75
|
Defaults to infinite (no expiration).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: CACHE\_DEFAULT\_TTL\_MS'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: CACHE\_DEFAULT\_TTL\_MS
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const CACHE_DEFAULT_TTL_MS: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/env.ts#L12)
|
|
13
|
+
|
|
14
|
+
Default cache TTL in milliseconds applied when no provider-specific TTL is configured.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: CACHE\_MAX\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: CACHE\_MAX\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const CACHE_MAX_ENTRIES: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/env.ts#L15)
|
|
13
|
+
|
|
14
|
+
Maximum number of entries retained in an in-memory cache (LRU limit).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: CACHE\_STALE\_WHILE\_REVALIDATE'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: CACHE\_STALE\_WHILE\_REVALIDATE
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const CACHE_STALE_WHILE_REVALIDATE: IConfigKey<boolean>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/env.ts#L18)
|
|
13
|
+
|
|
14
|
+
Whether expired entries are served while a background refresh is in progress.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: PLATFORM\_CACHING\_CONFIG\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: PLATFORM\_CACHING\_CONFIG\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const PLATFORM_CACHING_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [env.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/env.ts#L25)
|
|
13
|
+
|
|
14
|
+
All configuration entries required by `platform-caching`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: REDIS\_CONFIG\_ENTRIES'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: REDIS\_CONFIG\_ENTRIES
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const REDIS_CONFIG_ENTRIES: ReadonlyArray<Omit<IConfigRegistryEntry, "module">>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [redis/env.ts:25](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/env.ts#L25)
|
|
13
|
+
|
|
14
|
+
Configuration entries required by the Redis caching provider.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: REDIS\_KEY\_PREFIX'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: REDIS\_KEY\_PREFIX
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const REDIS_KEY_PREFIX: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [redis/env.ts:15](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/env.ts#L15)
|
|
13
|
+
|
|
14
|
+
Key prefix applied to all Redis keys managed by the cache instance.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: REDIS\_TTL\_SECONDS'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: REDIS\_TTL\_SECONDS
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const REDIS_TTL_SECONDS: IConfigKey<number>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [redis/env.ts:18](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/env.ts#L18)
|
|
13
|
+
|
|
14
|
+
TTL in seconds applied to every stored Redis entry.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 'Variable: REDIS\_URL'
|
|
3
|
+
generated: true
|
|
4
|
+
editUrl: false
|
|
5
|
+
---
|
|
6
|
+
# Variable: REDIS\_URL
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const REDIS_URL: IConfigKey<string>;
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Defined in: [redis/env.ts:12](https://github.com/RueDeRennes/archipel/blob/main/libs/platform-caching/src/redis/env.ts#L12)
|
|
13
|
+
|
|
14
|
+
Redis connection URL (e.g. `redis://localhost:6379`).
|
|
@@ -22,3 +22,16 @@ editUrl: false
|
|
|
22
22
|
| [ILayeredCache](Interface.ILayeredCache) | Generic layered cache contract supporting synchronous and asynchronous access patterns with optional warm-up and statistics. |
|
|
23
23
|
| [ILayeredCacheOptions](Interface.ILayeredCacheOptions) | Configuration options for [MemoryLayeredCache](Class.MemoryLayeredCache). |
|
|
24
24
|
| [IRedisLayeredCacheOptions](Interface.IRedisLayeredCacheOptions) | Configuration options for [RedisLayeredCache](Class.RedisLayeredCache). |
|
|
25
|
+
|
|
26
|
+
## Variables
|
|
27
|
+
|
|
28
|
+
| Variable | Description |
|
|
29
|
+
| ------ | ------ |
|
|
30
|
+
| [CACHE\_DEFAULT\_TTL\_MS](Variable.CACHE_DEFAULT_TTL_MS) | Default cache TTL in milliseconds applied when no provider-specific TTL is configured. |
|
|
31
|
+
| [CACHE\_MAX\_ENTRIES](Variable.CACHE_MAX_ENTRIES) | Maximum number of entries retained in an in-memory cache (LRU limit). |
|
|
32
|
+
| [CACHE\_STALE\_WHILE\_REVALIDATE](Variable.CACHE_STALE_WHILE_REVALIDATE) | Whether expired entries are served while a background refresh is in progress. |
|
|
33
|
+
| [PLATFORM\_CACHING\_CONFIG\_ENTRIES](Variable.PLATFORM_CACHING_CONFIG_ENTRIES) | All configuration entries required by `platform-caching`. |
|
|
34
|
+
| [REDIS\_CONFIG\_ENTRIES](Variable.REDIS_CONFIG_ENTRIES) | Configuration entries required by the Redis caching provider. |
|
|
35
|
+
| [REDIS\_KEY\_PREFIX](Variable.REDIS_KEY_PREFIX) | Key prefix applied to all Redis keys managed by the cache instance. |
|
|
36
|
+
| [REDIS\_TTL\_SECONDS](Variable.REDIS_TTL_SECONDS) | TTL in seconds applied to every stored Redis entry. |
|
|
37
|
+
| [REDIS\_URL](Variable.REDIS_URL) | Redis connection URL (e.g. `redis://localhost:6379`). |
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
title: platform-caching
|
|
3
3
|
description: Layered caching with in-memory LRU and Redis-backed implementations, TTL, stale-while-revalidate, and metrics.
|
|
4
4
|
order: 15
|
|
5
|
-
tags: [caching, lru, redis, ttl, stale-while-revalidate, metrics]
|
|
5
|
+
tags: [caching, lru, redis, ttl, stale-while-revalidate, metrics, health]
|
|
6
6
|
package: '@breadstone/archipel-platform-caching'
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -84,6 +84,29 @@ Both implementations share this contract:
|
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
|
+
## Environment Variables
|
|
88
|
+
|
|
89
|
+
### Core (optional)
|
|
90
|
+
|
|
91
|
+
| Variable | Description | Default | Required |
|
|
92
|
+
| ------------------------------ | ------------------------------------------------------------ | ------- | -------- |
|
|
93
|
+
| `CACHE_DEFAULT_TTL_MS` | Default cache TTL in milliseconds | — | No |
|
|
94
|
+
| `CACHE_MAX_ENTRIES` | Maximum number of entries retained in an in-memory cache | — | No |
|
|
95
|
+
| `CACHE_STALE_WHILE_REVALIDATE` | Whether expired entries are served during background refresh | `false` | No |
|
|
96
|
+
|
|
97
|
+
### Redis
|
|
98
|
+
|
|
99
|
+
**Subpath:** `@breadstone/archipel-platform-caching/redis`
|
|
100
|
+
**SDK:** `ioredis` ≥ 5.0.0
|
|
101
|
+
|
|
102
|
+
| Variable | Description | Default | Required |
|
|
103
|
+
| ------------------- | ----------------------------------- | ------- | -------- |
|
|
104
|
+
| `REDIS_URL` | Redis connection URL | — | Yes |
|
|
105
|
+
| `REDIS_KEY_PREFIX` | Key prefix for all Redis cache keys | `''` | No |
|
|
106
|
+
| `REDIS_TTL_SECONDS` | TTL in seconds for Redis entries | — | No |
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
87
110
|
## Metrics
|
|
88
111
|
|
|
89
112
|
Implement `ICacheMetricsRecorder` to forward cache statistics to your telemetry system:
|
|
@@ -114,6 +137,29 @@ When no recorder is provided, `NoopCacheMetricsRecorder` is used as a silent fal
|
|
|
114
137
|
|
|
115
138
|
---
|
|
116
139
|
|
|
140
|
+
## Health Check
|
|
141
|
+
|
|
142
|
+
The `CachingHealthIndicator` reports the caching subsystem as available. Import it from the `/health` subpath:
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
import { CachingHealthIndicator } from '@breadstone/archipel-platform-caching/health';
|
|
146
|
+
import { HealthModule } from '@breadstone/archipel-platform-health';
|
|
147
|
+
|
|
148
|
+
@Module({
|
|
149
|
+
imports: [
|
|
150
|
+
CachingModule,
|
|
151
|
+
HealthModule.withIndicators([CachingHealthIndicator]),
|
|
152
|
+
],
|
|
153
|
+
})
|
|
154
|
+
export class AppModule {}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
| Key | Check | Dependencies |
|
|
158
|
+
| --- | ----- | ------------ |
|
|
159
|
+
| `caching` | Always reports `up` | None |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
117
163
|
## API Reference
|
|
118
164
|
|
|
119
165
|
See the full [API documentation](./api/) for all exported types and classes.
|