Small fix to free caches after each rendering.