@credo-ts/core
Version:
<p align="center"> <br /> <img alt="Credo Logo" src="https://github.com/openwallet-foundation/credo-ts/blob/c7886cb8377ceb8ee4efe8d264211e561a75072d/images/credo-logo.png" height="250px" /> </p> <h1 align="center"><b>Credo - Core</b></h1
21 lines • 1.29 kB
text/typescript
import { BaseRecord } from "../../storage/BaseRecord.mjs";
import { BaseRecordConstructor, Query, QueryOptions, StorageService } from "../../storage/StorageService.mjs";
import { AgentContext } from "../../agent/context/AgentContext.mjs";
import "../../agent/index.mjs";
//#region src/modules/cache/CachedStorageService.d.ts
export declare class CachedStorageService<T extends BaseRecord<any, any, any>> implements StorageService<T> {
private storageService;
readonly supportsCursorPagination = false;
constructor(storageService: StorageService<T>);
private cache;
private getCacheKey;
save(agentContext: AgentContext, record: T): Promise<void>;
update(agentContext: AgentContext, record: T): Promise<void>;
delete(agentContext: AgentContext, record: T): Promise<void>;
deleteById(agentContext: AgentContext, recordClass: BaseRecordConstructor<T>, id: string): Promise<void>;
getById(agentContext: AgentContext, recordClass: BaseRecordConstructor<T>, id: string): Promise<T>;
getAll(agentContext: AgentContext, recordClass: BaseRecordConstructor<T>): Promise<T[]>;
findByQuery(agentContext: AgentContext, recordClass: BaseRecordConstructor<T>, query: Query<T>, queryOptions?: QueryOptions): Promise<T[]>;
}
//#endregion
//# sourceMappingURL=CachedStorageService.d.mts.map