SQLite Forum

C API for holding shm file in cache memory on Mac OS X and Linux?
There's no way to do that.

However, the caching systems used by macOS and Linux are very efficient.  If you aren't trying to use all available memory for other things, that information should continue to be in memory, and you can access it without needing access to backing store.