Flush the cache into the persistence store manually
Is it possible to flush the cache into the persistence store (if write-through/behind is used) manually,
i.e. not waiting for either flush size or flush frequency, but trigger it directly from the application?
Re: Flush the cache into the persistence store manually
If write-though is used, there is no need to do this, because each update will be propagated to the cache store synchronously.
In case of write-behind there is no way to flush the data manually, but it will be flushed eventually.
Also, as we discussed in the chat, since you're going to clean the cache each time you flush it, you can simply iterate through the cache and write to the DB manually, bypassing the cache store.