factorize common redis object things