add cache_key_helper and move validations