UNPKG

@devmehq/open-graph-extractor

Version:

Fast, lightweight Open Graph, Twitter Card, and structured data extractor for Node.js with caching and validation

21 lines (20 loc) 575 B
import type { ICacheOptions } from "./types"; /** * Cache manager interface */ export interface CacheManager { get(url: string): Promise<unknown | null>; set(url: string, value: unknown, customTtl?: number): Promise<void>; delete(url: string): Promise<void>; clear(): Promise<void>; has(url: string): Promise<boolean>; getStats(): { hits: number; misses: number; size: number; } | null; } /** * Create a cache manager with default settings */ export declare function createCache(options?: ICacheOptions): CacheManager;