Hi there,
BaseX 10 will come with a new Caching Module [1], which will allow you to store XQuery values (atomic items, nodes, sequences, maps, arrays, anything except function items) in a main-memory cache. Caches are persistent: Its contents will be written to disk at shutdown time and retrieved from disk in a new or restarted BaseX instance when accessed for the first time.
The cache size is only limited by the available RAM. We started off with an XML format for representing caches in files, but we switched to a binary format to speed up the processing of large caches. It’s also possible to put large XML documents in the cache, but the classic database representation will give you better results in most cases.
A first snapshot is available [2].
In addition, we’ll soon introduce new database functions, which will enable you to store XQuery values (…including maps) in a database.
Have fun, Christian
[1] https://docs.basex.org/wiki/Caching_Module [2] https://files.basex.org/releases/latest-10/