In memory IPFS to prevent use of IndexedDb

Hello

I wish to use ipfs-js within an iframe, which have restricted permissions
That means i cannot use IndexedDB, which is used internally by ipfs.
How can i switch to an in memory cache instead of indexeddb?
Is there an easy way to do it, or would i need to monkey patch it?