@codesoul-co/hypha-adapters-local / in-memory-execution-cache-store
- Package index:
@codesoul-co/hypha-adapters-local - Source:
packages/adapters-local/src/in-memory-execution-cache-store.ts - Exports: 4
Using this module
Use the In memory execution cache store module for persisting and reading data at this boundary. It exports 2 classes, 2 interfaces.
Import from the package entrypoint
ts
import {
InMemoryExecutionCacheStore,
NodeExecutionFingerprintHasher,
} from '@codesoul-co/hypha-adapters-local';
import type {
InMemoryExecutionCacheStoreOptions,
InMemoryExecutionCacheStoreStats,
} 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 2 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
InMemoryExecutionCacheStore | class | new InMemoryExecutionCacheStore(options?: InMemoryExecutionCacheStoreOptions): InMemoryExecutionCacheStore | Bounded local reference store. Durable or shared providers implement the same Core port. |
NodeExecutionFingerprintHasher | class | new NodeExecutionFingerprintHasher(): NodeExecutionFingerprintHasher | Node Execution Fingerprint Hasher class with 3 public constructor or member entries; its exact declarations are listed below. |
InMemoryExecutionCacheStoreOptions | interface | interface InMemoryExecutionCacheStoreOptions | In Memory Execution Cache Store Options interface with 3 public fields or methods. |
InMemoryExecutionCacheStoreStats | interface | interface InMemoryExecutionCacheStoreStats | In Memory Execution Cache Store Stats interface with 3 public fields or methods. |
InMemoryExecutionCacheStore
Bounded local reference store. Durable or shared providers implement the same Core port.
- Kind: class
- Import:
import { InMemoryExecutionCacheStore } from '@codesoul-co/hypha-adapters-local'; - Source module:
in-memory-execution-cache-store
Declaration
text
export declare class InMemoryExecutionCacheStore implements ExecutionCacheStore {
constructor(options?: InMemoryExecutionCacheStoreOptions);
get(key: string): Promise<ExecutionCacheRecord | null>;
set(key: string, rawRecord: ExecutionCacheRecord): Promise<void>;
delete(key: string): Promise<void>;
clear(): Promise<void>;
stats(): InMemoryExecutionCacheStoreStats;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
clear | method | clear(): Promise<void> | Public method; parameters and return type are shown in the signature. |
constructor | constructor | (options?: InMemoryExecutionCacheStoreOptions): InMemoryExecutionCacheStore | 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, rawRecord: ExecutionCacheRecord): Promise<void> | Public method; parameters and return type are shown in the signature. |
stats | method | stats(): InMemoryExecutionCacheStoreStats | Public method; parameters and return type are shown in the signature. |
NodeExecutionFingerprintHasher
Node Execution Fingerprint Hasher class with 3 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { NodeExecutionFingerprintHasher } from '@codesoul-co/hypha-adapters-local'; - Source module:
in-memory-execution-cache-store
Declaration
text
export declare class NodeExecutionFingerprintHasher implements ExecutionFingerprintHasher {
readonly algorithm: "sha256";
hashUtf8(canonicalValue: string): Promise<string>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
algorithm | property | readonly algorithm: "sha256" | Public property; its type, readonly modifier and optionality are shown in the signature. |
constructor | constructor | (): NodeExecutionFingerprintHasher | Creates an instance of this class. |
hashUtf8 | method | hashUtf8(canonicalValue: string): Promise<string> | Public method; parameters and return type are shown in the signature. |
InMemoryExecutionCacheStoreOptions
In Memory Execution Cache Store Options interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { InMemoryExecutionCacheStoreOptions } from '@codesoul-co/hypha-adapters-local'; - Source module:
in-memory-execution-cache-store
Declaration
text
export interface InMemoryExecutionCacheStoreOptions {
maxEntries?: number;
maxBytes?: number;
maxEntryBytes?: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
maxBytes | property | maxBytes?: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
maxEntries | property | maxEntries?: 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. |
InMemoryExecutionCacheStoreStats
In Memory Execution Cache Store Stats interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { InMemoryExecutionCacheStoreStats } from '@codesoul-co/hypha-adapters-local'; - Source module:
in-memory-execution-cache-store
Declaration
text
export interface InMemoryExecutionCacheStoreStats {
entries: number;
sizeBytes: number;
evictions: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
entries | property | entries: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
evictions | property | evictions: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
sizeBytes | property | sizeBytes: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
