Bug fixes in the cache: when clearing caches, all
lastRenderedImages/texture members must be cleared too , otherwise the
images won't be wiped.
Also when a viewer changes its hash, clear only the textures for that
viewer, not for all.