okta-mcp-server
Version:
Model Context Protocol (MCP) server for Okta API operations with support for bulk operations and caching
61 lines • 1.59 kB
TypeScript
/**
* SQLite-based cache implementation for high-performance caching
*/
import { ICache, CacheOptions } from './interface.js';
import { EventBus } from '../../core/event-bus.js';
export interface SqliteCacheOptions {
filePath?: string;
inMemory?: boolean;
maxSize?: number;
eventBus?: EventBus;
cleanupInterval?: number;
walMode?: boolean;
}
export declare class SqliteCache implements ICache {
private db;
private eventBus;
private cleanupTimer?;
private maxSize;
private preparedStatements;
constructor(options?: SqliteCacheOptions);
private initializeSchema;
private prepareStatements;
get<T>(key: string): Promise<T | undefined>;
set<T>(key: string, value: T, options?: CacheOptions): Promise<void>;
delete(key: string): Promise<boolean>;
has(key: string): Promise<boolean>;
clear(): Promise<void>;
clearByTag(tag: string): Promise<void>;
size(): Promise<number>;
/**
* Get all keys (for debugging)
*/
keys(): Promise<string[]>;
/**
* Clean up expired entries
*/
private cleanupExpired;
/**
* Evict oldest entries if cache is full
*/
private evictIfNeeded;
/**
* Get cache statistics
*/
getStats(): {
size: number;
expired: number;
hits?: number;
misses?: number;
dbSize: number;
};
/**
* Close the database connection
*/
close(): void;
/**
* Optimize the database (VACUUM)
*/
optimize(): Promise<void>;
}
//# sourceMappingURL=sqlite-cache.d.ts.map