ubon
Version:
Security scanner for AI-generated React/Next.js and Python apps. Catches hardcoded secrets, accessibility issues, and vulnerabilities that traditional linters miss.
41 lines (40 loc) • 888 B
TypeScript
export interface CacheEntry<T> {
data: T;
timestamp: number;
ttl: number;
}
export declare class FileCache<T> {
private cacheDir;
constructor(name: string);
private ensureCacheDir;
private getCacheFilePath;
/**
* Get cached data if it exists and hasn't expired
*/
get(key: string): T | null;
/**
* Store data in cache with TTL
*/
set(key: string, data: T, ttlMs: number): void;
/**
* Clear all cached entries (cleanup utility)
*/
clear(): void;
/**
* Remove expired entries (maintenance utility)
*/
cleanup(): void;
}
/**
* Create a cache key for OSV queries
*/
export declare function createOSVCacheKey(queries: any[]): string;
/**
* Default TTL values
*/
export declare const CACHE_TTL: {
OSV_VULNERABILITIES: number;
SHORT: number;
MEDIUM: number;
LONG: number;
};