refactor CacheImageServer