FileCertCache is a CertCache implementation that stores the JWT cert records in a file.
v0.8.0
const certCacheSchema = z.object({certs: z.record(z.string(), z.record(z.string(), z.string())), _ts: z.number()}) satisfies CertRecordsSchema;await useCache(new FileCertCache({fileName: './certCache.json', schema: certCacheSchema})); Copy
const certCacheSchema = z.object({certs: z.record(z.string(), z.record(z.string(), z.string())), _ts: z.number()}) satisfies CertRecordsSchema;await useCache(new FileCertCache({fileName: './certCache.json', schema: certCacheSchema}));
Protected
FileCertCache is a CertCache implementation that stores the JWT cert records in a file.
Since
v0.8.0
Example