cache_failures: handle undefined or other values by not caching