Cache image layers