add cache support to image loader

need to test on huge amount of images