cache: Yet another attempt to fix SQLite locking issues
When we set "normal" locking mode we start to get errors of missing data in the test_concurrent_writes() test. Explicit syncing maybe the best way to solve this as we certainly don't want to sync after every write.