Expiration is not replicated: An expiration time you set on server is not propagated to clients. So the document will be purged on the server, but clients that already had the document won’t be affected; they still have it.
We also tried manually deleting and purging docs manually, but the SQLIte db doesnt shrink in size.
Hm. Compacting the database runs a SQLite PRAGMA optimize
and PRAGMA incremental_vacuum
. (The database is put in auto_vacuum=incremental
mode when created.) This should shrink the file if there are unused pages.
Check the logs for a message Vacuuming database
; if you don’t see that, maybe the actual compact method isn’t being reached for some reason.
Oh also, 140MB isn’t that big, so I wouldn’t expect queries to get too slow. This could be a sign that you don’t have effective indexes, as a linear database scan will definitely get slow as the db grows, especially on devices with slow storage. Have you used the explain
method to check your queries?