All stored product-detail records, or [] when the read fails.
const entries = await getAllSupplierProductDataCacheEntries();
entries.length; // => number of cached product-detail rows
export async function getAllSupplierProductDataCacheEntries(): Promise<
Array<{ cacheKey: string; data: Record<string, unknown>; timestamp: number }>
> {
try {
const db = await getDB();
return await db.getAll(IDB_STORE.SUPPLIER_PRODUCT_DATA_CACHE);
} catch (error) {
logger.error('Failed to get all supplier product data cache entries from IndexedDB', { error });
return [];
}
}
Read every entry in the supplier product-detail cache — the enriched per-product data keyed by product identity. Intended for manual inspection from the debug console; each record carries its
cacheKey, the cacheddata, and its last-accesstimestamp. Returns[]on failure.