@codesoul-co/hypha-adapters-local / redis-execution-cache-store
- Package index:
@codesoul-co/hypha-adapters-local - Source:
packages/adapters-local/src/redis-execution-cache-store.ts - Exports: 3
Using this module
Use the Redis execution cache store module for persisting and reading data at this boundary. It exports 1 class, 2 interfaces.
Import from the package entrypoint
ts
import {
RedisExecutionCacheStore,
} from '@codesoul-co/hypha-adapters-local';
import type {
RedisExecutionCacheStoreOptions,
RedisLikeExecutionCacheClient,
} from '@codesoul-co/hypha-adapters-local';Usage patterns
- Use the 2 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 1 class as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
RedisExecutionCacheStore | class | new RedisExecutionCacheStore(options: RedisExecutionCacheStoreOptions): RedisExecutionCacheStore | Key-bound shared Execution Cache Store. The client port can wrap local, self-hosted, or managed Redis without exposing a Redis SDK to Core. |
RedisExecutionCacheStoreOptions | interface | interface RedisExecutionCacheStoreOptions | Redis Execution Cache Store Options interface with 5 public fields or methods. |
RedisLikeExecutionCacheClient | interface | interface RedisLikeExecutionCacheClient | Redis Like Execution Cache Client interface with 3 public fields or methods. |
RedisExecutionCacheStore
Key-bound shared Execution Cache Store. The client port can wrap local, self-hosted, or managed Redis without exposing a Redis SDK to Core.
- Kind: class
- Import:
import { RedisExecutionCacheStore } from '@codesoul-co/hypha-adapters-local'; - Source module:
redis-execution-cache-store
Declaration
text
export declare class RedisExecutionCacheStore implements ExecutionCacheStore {
constructor(options: RedisExecutionCacheStoreOptions);
get(key: string): Promise<ExecutionCacheRecord | null>;
set(key: string, input: ExecutionCacheRecord): Promise<void>;
delete(key: string): Promise<void>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: RedisExecutionCacheStoreOptions): RedisExecutionCacheStore | Creates an instance of this class. |
delete | method | delete(key: string): Promise<void> | Public method; parameters and return type are shown in the signature. |
get | method | get(key: string): Promise<ExecutionCacheRecord | null> | Public method; parameters and return type are shown in the signature. |
set | method | set(key: string, input: ExecutionCacheRecord): Promise<void> | Public method; parameters and return type are shown in the signature. |
RedisExecutionCacheStoreOptions
Redis Execution Cache Store Options interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { RedisExecutionCacheStoreOptions } from '@codesoul-co/hypha-adapters-local'; - Source module:
redis-execution-cache-store
Declaration
text
export interface RedisExecutionCacheStoreOptions {
client: RedisLikeExecutionCacheClient;
namespace?: string;
maxEntryBytes?: number;
defaultTtlMs?: number;
now?: () => number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
client | property | client: RedisLikeExecutionCacheClient | Public property; its type, readonly modifier and optionality are shown in the signature. |
defaultTtlMs | property | defaultTtlMs?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxEntryBytes | property | maxEntryBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
namespace | property | namespace?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
now | method | now?(): number | Public method; parameters and return type are shown in the signature. |
RedisLikeExecutionCacheClient
Redis Like Execution Cache Client interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { RedisLikeExecutionCacheClient } from '@codesoul-co/hypha-adapters-local'; - Source module:
redis-execution-cache-store
Declaration
text
export interface RedisLikeExecutionCacheClient {
get(key: string): Promise<string | null>;
set(key: string, value: string, mode: 'PX', durationMilliseconds: number): Promise<unknown>;
del(...keys: string[]): Promise<number>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
del | method | del(...keys: string[]): Promise<number> | Public method; parameters and return type are shown in the signature. |
get | method | get(key: string): Promise<string | null> | Public method; parameters and return type are shown in the signature. |
set | method | set(key: string, value: string, mode: "PX", durationMilliseconds: number): Promise<unknown> | Public method; parameters and return type are shown in the signature. |
