ImageLoader class with caching logic implemented