mneme.db:compact

mneme

db:compact(output_path) -> ok, err

Compact the database to a new file

Copies all live (non-expired) data to a new database file, reclaiming free pages and removing fragmentation. The current database is not modified. Commits in batches of 10000 keys per keyspace.

The new file is always the current format. Compact is how a format-4 store, which opens read-only, becomes a store that takes writes.