cache: use av_freep instead of av_free in cache_open