cache.ts
computeCacheKey
function
Computes a cache key from template + props + options.
getCached
function
Checks if a cached PNG exists for the given key. Returns the cached file path if found, null otherwise.
export async function getCached(cacheDir: string, key: string): Promise<Buffer | null>
Returns
Promise<Buffer | null> -
writeCache
function
Writes a PNG buffer to the cache.
export async function writeCache(cacheDir: string, key: string, png: Buffer): Promise<void>
Returns
Promise<void> -