The original attempt to fix the issue was accidentally using the wrong type for the image cache. This change fixes that.