fix updateCache not clearing the cached texture

this will clear the cached texture before render
Merge pull request #1173 from kambing86/dev

solve issue #1172, fix updateCache not clearing the cached texture