CacheManagingDrawTask: improve cache building and reusing