Boring refactor of cache-set.