File size is updated correctly according to 

> fdatasync() is similar to fsync(), but does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled.  For example, changes to  st_atime  or  st_mtime  (respec‐
       tively,  time  of  last  access  and  time  of last modification; see inode(7)) do not require flushing because they are not necessary for a subsequent data read to be handled correctly.  On the other hand, a change to the file size
       (st_size, as made by say ftruncate(2)), would require a metadata flush.

And we don't care about modification times.
Should work alright.
{
        auto it = index.find(key);
        if (it == nullptr)
            return;
        
        KeyType key_copy = it->getKey();
        index.erase(key);
        if constexpr (std::is_same_v<KeyType, StringRef>)
            complex_key_arena.free(const_cast<char *>(key_copy.data), key_copy.size);
    }
    SSDCacheDictionaryStorageConfiguration configuration;
    SSDCacheFileBuffer<SSDCacheKeyType> file_buffer;
    std::vector<SSDCacheMemoryBuffer<SSDCacheKeyType>> memory_buffer_partitions;
    pcg64 rnd_engine;
    using SimpleKeyHashMap = HashMap<UInt64, Cell>;
    using ComplexKeyHashMap = HashMapWithSavedHash<StringRef, Cell>;
    using CacheMap = std::conditional_t<
        dictionary_key_type == DictionaryKeyType::Simple,
        SimpleKeyHashMap,
        ComplexKeyHashMap>;
    ArenaWithFreeLists complex_key_arena;
    CacheMap index;
    size_t current_partition_index = 0;
};
}
#endif