So i have a sqlite database i run queries on using better-sqlite3, this database is being updated constantly, which will cause the queries i am running to mess up if certain data was changed while it was finishing all the queries. To combat this i am currently reading the sqlite file, and writing it into a different location, and then just accessing the data off of that since it won't be updated till i read and write it again. But i would rather not be constantly reading and writing the file to the disk if i don't need to. Is there a way to load the file into cache? The main issue would be i would need some path to that cached file, since better-sqlite3 uses the files path to start loading data, unless there's an option in better-sqlite3 I am unaware of, any advice would be appreciated, thanks.
I Have heard of something called memfs, but cannot get it to work with better-sqlite3 since it requires a path.