cache and redis improvements, thanks Niphlod