the improved cache helper