Open karalabe opened 5 years ago
@karalabe FastCache can offer the functionality to dump the cached items to file. https://github.com/VictoriaMetrics/fastcache/blob/master/file.go#L24
It's merged.
No, it's not. The clean cache is pushed to disk. The dirty is not.
I think this ticket is less relevant with pbss. Closable maybe?
cc @rjl493456442
Currently when Geth shuts down, its dirty state is committed to the database. There are two problems with this:
An alternative would be to just flatten the dirty memory cache into a flat file, and reload it from disk on startup. This would both avoid junk being pushed more frequently to disk than needed and also make the shutdown procedure faster since appending to a flat file is fast compared to injecting into leveldb.
Note, this PR would touch quite a bit of sensitive code paths, so it's not something super trivial. Not something insanely hard either.