Added cache_image() function to video class.