Add a configurable persisting mechanism.