UNPKG

@typecad/kicad-symbols

Version:

Intelligent fuzzy search for KiCad symbols with CLI interface

38 lines 1.35 kB
/** * Manages timestamp tracking for cache expiration */ export declare class TimestampManager { private readonly timestampFile; private readonly cacheExpirationHours; private readonly useSharedCache; constructor(cacheDir?: string, cacheExpirationHours?: number, useSharedCache?: boolean); /** * Gets the timestamp file path, creating shared cache directory if needed */ private getTimestampFile; /** * Reads the timestamp from the timestamp file * @returns The timestamp as a Date object, or null if file doesn't exist or is invalid */ readTimestamp(): Promise<Date | null>; /** * Writes the current timestamp to the timestamp file * @param timestamp Optional timestamp to write, defaults to current time */ writeTimestamp(timestamp?: Date): Promise<void>; /** * Checks if the cache is stale based on the timestamp file * @returns true if cache is stale (older than expiration time or doesn't exist) */ isCacheStale(): Promise<boolean>; /** * Gets the age of the cache in hours * @returns Age in hours, or null if no timestamp exists */ getCacheAgeHours(): Promise<number | null>; /** * Deletes the timestamp file */ deleteTimestamp(): Promise<void>; } //# sourceMappingURL=TimestampManager.d.ts.map