implementing image handler cache