move TextureCache to library