fixed $cache_file undef when $result undef