2 Replies Latest reply on Nov 3, 2011 9:15 PM by GANESHPACHPIND

    Iconitemrenderer icon cache




      i have one list in wich i am displaying icon from website which  chnages anytime but when when i reload list or invalidatelistdata my list shows old icon

      only after restarting application it shows updated icon



      after some search i found that iconitemrenderer cache image so i tried setting cachePolicy to off but also its not working


      i want to disable cache how to do it im mobile application


      or any other solution


      same image i tried to load in decoder it updates after refresh 


      if its not possible how to scale image in decorator

        • 1. Re: Iconitemrenderer icon cache
          Shongrunden Adobe Employee

          In order to turn off caching in IconItemRenderer you will need to subclass it and override createIconDisplay.  For example:




              import spark.components.IconItemRenderer;

              import spark.core.ContentCache;


              public class NoCacheIconItemRenderer extends IconItemRenderer



                  * When the icon display is created turn off the caching of its

                  * contentCache so it doesn't cache images.


                  override protected function createIconDisplay():void




                      var contentCache:ContentCache = iconDisplay.contentLoader as ContentCache;

                      if (contentCache)


                          contentCache.enableCaching = false;





          • 2. Re: Iconitemrenderer icon cache
            GANESHPACHPIND Level 1

            Thank You Veri Much