[renderer] make ImageCache thread safe