extract out a snapshot strategy to be shared by memory and es storages