(maintenance) Rewriting of eviction & expiration & write behind mapstore

Backport PR #2420