How to cache AVPlayer video?
<p>I have <code>AVPlayers</code> embedded into <code>UITableViewCells</code> and need a way to cache the video that's loaded so that when I refresh the table view, it doesn't have to load the videos again. The code I'm using at the moment to load videos is as follows:</p>

<pre><code>let videoString = "http://www.someurl.com"
let videoURL = NSURL(string: videoString)

videoPlayer = AVPlayer(URL: videoURL!)
videoPlayer!.actionAtItemEnd = AVPlayerActionAtItemEnd.None

videoView.playerLayer.player = videoPlayer
</code></pre>

<p>I cache images by storing the returned image from a server in a dictionary with it's ID as the key. I'm looking for a similar way for videos, any help would be appreciated.</p>