Reverting valid_cache_format() logic

Set it back the way it was (but as a one-liner that hopefully clarifies the intent for dummies like me).