import { PropsWithChildren } from "react"; import { CacheLocation, FpjsProvider, LoadOptions, } from "@fingerprintjs/fingerprintjs-pro-react"; const fpjsPublicApiKey = process.env.NEXT_PUBLIC_FPJS_PUBLIC_API_KEY as string; export const InMemoryCache: React.FC = ({ children }) => { const loadOptions: LoadOptions = { apiKey: fpjsPublicApiKey, }; return (

Solution with an in-memory cache

New API call made after a key expires, a page is reloaded or the provider is unmounted
{children}
); };