store: implement serialize method, use it

For triggering saving the contacts / labels caches.
This commit is contained in:
Dirk-Jan C. Binnema
2025-09-01 08:21:37 +03:00
committed by Seth Ladygo
parent 5ba4791add
commit bb399bc37a
4 changed files with 59 additions and 6 deletions

View File

@ -140,6 +140,17 @@ public:
*/
const ContactsCache& contacts_cache() const;
/**
* Serialize ephemeral information such as contacts, labels,
* in the database.
*
* Only available when using a writable database.
*
* @return Ok() or some error.
*/
Result<void> serialize();
/**
* Get the Indexer associated with this store. It is an error to call
* this on a read-only store.