small changes in texturemanager cache handling