Remove duplicate cached-image-src function.

Rename write-cache-to-disk to write-to-cache since the plan is to allow
for a configurable cache store (which may not live on disk).