Allow callable key in decorator. Move validations
to key function. Add tests for cache keys