These last two helpers look pretty generic -- if they were also implemented for e.g. memcached, it may make sense to extract them as shared helpers