On 13-Feb-20 23:38, Keith Medcalf wrote:
Correct. "memory" databases can only be shared between connections in the same process, and then only by the sharedcache method. In effect, a "memory" database is nothing more than a cache, and sharing it between connections means sharing the cache. cache=private uses a separate cache for the connection and therefore (by definition) a different "memory" database. You could, of course, use an "on disk" database where the database resides on a memory resident filesystem. On Linux you would simply mount another filesystem using tmpfs and put your "on disk" database there. Delete the "file" off the tmpfs filesystem when you are done with it. (Or just use /tmp if it is mounted using tmpfs which it usually is. Just beware that everyone has access to /tmp and if you mount your own tmpfs at a different location you can control the access permissions). On Windows the closest thing I know of that can create an autosizing ramdisk is http://winramtech.atwebpages.com/RAMDriv/ramdriv.htm though I have not tried it. For other OS's, Google is your friend!
My application should run on Linux and Windows. Using tmpfs on Linux could be doable, but having to setup a ramdisk on Windows would only complicate matters...
Are there any plans on supporting multiple connections to in-memory databases with separate caches?
If not, how much effort would be involved in getting this to be supported? Regards, Wim. _______________________________________________ sqlite-users mailing list email@example.com http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users