Is it possible to clear image cache at runtime?

I have an issue with downloading an image from a URL that is not getting updated at runtime. I'm using a URLLoader to download the file initially at the start of the app from some URL, then later on there is a call to the server which re-compiles the image into something else. After that the image is being downloaded again from the exact same URL, but as far as I can tell it's not getting the updated version, but is getting it from the cache that flash creates.
If I restart the application after doing all of this it gets the correct image when it downloads at startup, but I cannot for the life of me figure out how to get it to download the correct image at runtime. Does anyone have any idea how this can be accomplished?

append a variable to your url:
new URLRequest("yourimage.jpg?nocache="+getTimer());

Similar Messages

  • After Effects  clear images cache programmatically?

    hi,
    i'm currently developing an AE effect plugin.
    i want to be able to clear the cache programmatically
    from my effect plugin code.
    is there any way to do this?
    thanks in advance!

    Hi,
    May I ask why you need to clear image cache from your effect plug-in?
    It may be a bug (either in Plug-in or AE) if you need to do so for some reason.
    I can read Japanese, if you prefer to use Japanese.
    Thanks,
    -keiko

  • Clear Image Cache

    hi ,
    in my application i have to cache the image to some extend..
    and that i need to clear the image cache as my url dont
    change.
    is there anyway programatically i can refresh the image ?
    thanks

    "sohilr" <[email protected]> wrote in
    message
    news:ghts86$ls8$[email protected]..
    > hi ,
    > in my application i have to cache the image to some
    extend..
    > and that i need to clear the image cache as my url dont
    change.
    > is there anyway programatically i can refresh the image
    > thanks
    http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
    Q7

  • Clear images cache programmatically?

    hi,
    i'm currently developing an AE effect plugin.
    i want to be able to clear the cache programmatically
    from my effect plugin code.
    is there any way to do this?
    thanks in advance!

    Hello and welcome
    I think you would be much better off posting your question in the forums in English; these are in Spanish. It seems to me that you are looking for the After Effects forums, which are here:
    http://forums.adobe.com/community/aftereffects_general_discussion

  • Clear the cache

    hi
    i develop an extension for indesign with CS extension builder 2 et Flashbuilder 4.6, is it possible to clear the cache during the execution of the extension ? because indesign crash after 2 minutes of execution.
    thanks
    Simon

    Try "profile as..."
    You're probably accessing too many collections.
    If you post some of your code, we might be able to give pointers on how to improve it.
    I'd suggest taking that discussion to the InDesign Scripting Forum.

  • How do I clear Dreamweaver CS6 image cache (on Mac)?

    Hi,
    I have updated a remote image (absolute link) but it doesn't update in DW (CS6). How do I clear the image cache?

    Go to Site menu > Advanced > Recreate Site Cache, and see if  that helps.

  • Clear the iPhone's System (Image) Cache

    I have been working on a project involving a lot of images. After some painful discovery, our team realized that initWithContentsOfFile is necessary to prevent caching of the images.
    This led us to realize that it would be very handy if the cache could be cleared when a didReceiveMemoryWarning message is fired. Does anybody know how to clear the cache, short of restarting the app?
    Thanks!

    DanielMyst787,
    The cache will still be there, and show up as "other" when looked at in iTunes, but shouldn't interfere with other applications.

  • Clearing Template Cache

    I am running Coldfusion Developer Edition and Dreamweaver
    CS3, and I have a problem with getting an error message when saving
    a page multiple times during testing. I will save the file, tweak
    it, and save it again. I even get it sometimes when trying to
    export images from Fireworks. After a few times I try to save it
    again and get a couple of different error messages. I sometimes get
    the message when trying to transfer the file to my web host server.
    Sometimes it is just "Unable to complete operation' and sometimes
    it says that the file is open in another application which it
    isn't. In reading I learned that this has to do with clearing the
    template cache. Whenever it happens I go to the Administrator,
    click on clear template cache now, and it always fixes the problem.
    That is a workaround that allows me to get the job done, but it is
    a huge hassle, and I often have to do it before every save. I have
    played with the maximum number of cached templates and the trusted
    templates option to no avail. It is making me crazy. Does anybody
    have a solution?
    Just for the record I am a medium level user so answers need
    to be understandable by humans. :-:

    If your webserver is public facing, its possible that the
    page got hit by a search engine spider. Or if you CF file name is
    something easy to guess (like index.cfm or admin.cfm) if could be
    script kiddies trying to footprint your server. Or it could be some
    other software package (we have the same problem with
    WebTrends)

  • Image Caching With JList

    Hi all, I need to know, how can I implement an Image Cache feature with a JList that is effective, ie. basic I would like the images to be stored in memory when the list is visible (done that already using a WeakHashMap<String, Icon>) and removed from memory when the JList is not displayed.
    Currently I use the following code section, to try and remove the data from memory, seems not work according to task manager. Sorry I cannot seem to come up with a good SSCCE since I'm not exactly sure how to make an example that loads images. Any suggestion with that?
    WeakHashMap<String,Icon> icons = new WeakHashMap<String,Icon>();
    JList list = new JList(); // something like this in actual code
    public void startClearTimer() {
        new javax.swing.Timer( 30000, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if(!list.isShowing() && icons.size() > 0 ) {
                    resetIconCache();
                    System.out.println("Icons Cleared");
                    System.gc();
                    //((javax.swing.Timer)e.getSource()).stop();
        }).start();
    public void resetIconCache() {
        if(icons == null) {
            return;
        Iterator<Icon> images = icons.values().iterator();
        while(images.hasNext()) {
            ImageIcon icon = (ImageIcon)images.next();
            icon.getImage().flush(); // smoke but no cigar
            icon = null;
        icons.clear();
        icons = new WeakHashMap<String,Icon>();
    }This code is used in a ListCellRenderer, which loads the images, scales them, caches them in memory so the repaints are faster and displays them along side some JLabels.
    So basically how can I load the images in memory and release the resources used when the images are not required?
    ICE

    you can't be cleverer than JVM for memory usage.
    Of course you can, because the point of caching is that it requires (or at the very least is optimised by) some understanding of the use case. JVMs are somewhat unlikely to predict how any given set of users will use any given application, nor are they capable of factoring in the cost of downloading (or otherwise obtaining) data which has been freed from memory. To a JVM, a lump of voidable memory is no different to any other.
    Take an example of an applet (which is limited to 96Mb of heap) which browses images on a server. Let's say it's looking at images which occupy 20Mb of memory each (far from unreasonable) in memory. They might each be 1Mb or so in compressed file size, which is an appreciable delay in download time.
    Each time the user switches between images, the applet will probably want to implement a policy that says "that last image should be kept in memory if possible, since the user might return to it and they won't want another long delay to load it, but if you run out of memory downloading the next image, feel free to discard the first, because the next is more important." (Furthermore, your workflow might permit you to prioritise images.)
    In order to indicate to the JVM that the first image is disposable, you must clear all strong references to it. However, this simply makes it eligible for garbage collection: simple as that. You have no control over whether the garbage collector will clean that image data (which takes several seconds to retrieve) or a bunch of other data which is completely useless or can be recreated in milliseconds. Also note that in practice, weak and soft references do not actually encourage the GC to retain the data: it is cleared long before the memory is actually required.
    Note, too, that the suggestion of tweaking the heap allocation is no use for an applet (unless you have a very small, very knowledgeable and very tolerant user base).

  • I am having a hard time with a page that is working for everyone else. When I click on anything in the site I get a message that says "The page you were looking for doesn't exist."  This is happening on both my ipad 2 and my iphone 5. I cleared my cache

    When I click on anything in the site I get the message " The page you were looking for doesn't exist."  This website works for everyone else, but not on my iPad 2 or iPhone 5. I cleared my cache and history on the iPad, but it still isn't working.

    I live in Germany and my credit card is in my native country of Holland .. then it
    doesn't accept my credit card.
    Your first statement explains the second statement. To use the German iTunes Store, you need to prove that you're a resident of Germany (that is required by the content owners who will not allow cross-border sales) and the only way Apple can provide such a verification is by requiring that you enter in either a German credit card or a German-purchased iTunes prepaid card. Since I presume the former is not a possibility, you'll need to do the latter if you wish to purchase content from the iTunes Store. Again, this is not Apple's choice but is forced on them by the content owners as a requirement for Apple being allowed to sell the content. The EU is working on regulations that would force the content owners to allow access pan-EU, but that's still in the works.
    You do not need an iTunes Store account to activate and run your iPad, though; at least, I didn't need one for either of my two iPads. If you only want to set up an account so you can get free iPad apps, take a look here:
    http://support.apple.com/kb/HT2534
    Read the steps carefully as the order in which you follow them is apparently critical. This seems to come and go, or only apply to App Stores in specific countries, so you may not see the option for "None" when asked for a payment type.
    As to the German iTunes Store in English, you can comment to Apple on that via their feedback pages:
    http://www.apple.com/feedback
    Regards.
    P.S. Regarding "this is the only place for a complaint and that will no doubt get removed because
    I'm not full of happy joy sparkles.
    As stated in the terms of use to which we all agreed, this isn't a complaint forum, it's a technical support forum. You don't have to be full of "happy joy sparkles", but posts that are nothing but complaints may indeed be removed. If you want to complain to Apple, use the feedback pages.
    Message was edited by: Dave Sawyer

  • My safari,4.1.3 on the bottom says cancelled opening page. have cleared the cache,and reset but it still does it on some pages,not all. Any ideas

    My safari,4.1.3 on the bottom says cancelled opening page. have cleared the cache,and reset but it still does it on some pages,not all. Any ideas

    It's possible that the pages you are attempting to open simply won't work with that old web browser.
    If you're using Mac OS X Tiger, update to the latest version, which is 10.4.11. (You might be using that already. Your profile says you're running 10.4.1, but I bet that's just a typo.)
    Then get the latest version of Safari that will run on Tiger. (And... you have that already: 4.1.3.)
    You might try a more modern browser designed specifically for your current OS. That would be TenFourFox.
    Information on TenFourFox:
    http://en.wikipedia.org/wiki/TenFourFox
    Download TenFourFox here:
    http://www.floodgap.com/software/tenfourfox/

  • Image cache not working with Firefox and apex

    Hi,
    I'd like to cache all my images to save page rendering time and bandwidth because my images are all static and never change.
    I use the John Scott's caching technique Link: [http://jes.blogs.shellprompt.net/2007/05/18/apex-delivering-pages-in-3-seconds-or-less/], in a few words this technique consists of adding a header line "Expires: date in the future" in the http response.
    It works very well in IE, the images are cached and the same image can be accessed several times (within the same session or in different sessions) without issuing an http request to the server each time.
    with Firefox it does not work, the same image is asked again and again to the server (i'm using FF 3.5 and APEX 3.2).
    - Is it a date format problem? no, because when i type about:cache in FF, i can find my image in the cache with an expire date in the future.
    The weird thing here is that the counter is incremented each time u request the image, so FF knows it is in the cache and even if the expire date is in the future, FF asks it again to the server.
    - Is it a FF bug? If u read the http specs or if u google a little, u can come to the conclusion that FF does not follow the standards,
    but... images.google.com for example manages to get its images cached with FF.
    They use an http response header "cache-control: public, max-age=604800".
    I tried the same and all kinds of combinations but without success.
    When i compare my image with the one from google in the FF cache, they both have the same attributes.
    - It's not an apex issue neither because it works with IE, most probably an incompatibility between apex and FF?
    Maybe the use of cookie? or the http request (not the response) containing "cache-control: max-age=0"?
    I've found so far 2 half solutions:
    1) use ETag and modified date, see the Tyler Muth's note Link: [http://tylermuth.wordpress.com/2008/02/04/image-caching-in-plsql-applications/].
    with this technique FF continues to send request each time but the answer is shorter because it's just a "304 not modified" instead of "200 OK" (200 response is bigger as it contains the image).
    it's better than nothing but you still have 1 request + 1 response for nothing.
    Another problem is that you need SYS access to implement this, which is not possible on an hosted server. (note that for images from the file system it is already foreseen by apex 3.1, Tyler's note is for images from the db)
    2) if you preload the image (using myimage=new Image();myimage.src='...';), then there is max 1 request per browser session.
    There are 2 minor issues here:
    - no caching across sessions
    - if u don't want to preload all the images (example a page with lots of thumbnails, when user clicks it show a bigger image, in that case the thumbnails can be preloaded but overkill for the big images), then you need to load the image, wait until the image has loaded before displaying it, it does not slow down the execution, but requires some extra JS.
    I'm not asking anyone to investigate it, i can live with the 2 workarounds,
    but just in case someone encountered the same problem and already fixed it.
    Let me know if u managed to use the John Scott's technique with Firefox. (U can use Firebug to see the http traffic)
    Thx
    Tim

    Hi Anshul, hope these help. Let me know if you need to see anything else.
    Best,
    Menu Settings:
    Tab Hyperlink:
    Label Text with with hyper link option not available (works as a hyperlink in chrome and IE though):
    Thanks for the help in advance!

  • How to clear the caching realm?

    Hello,
    WebLogic Server 5.1 SP 6 on W2k Server
    Is it possible to emtpy the caching realm inside of an EJB?
    The class weblogic.security.acl.CachingRealm
    provides the clearCaches() method, but I don't know how
    to get the actual cache object within an EJB in the WebLogic
    server.
    Thanx in advance,
    Michael

    yeah word
    This works for sure in a servlet or jsp
    <%
    response.setContentType("text/html");
    BasicRealm basicRealm = Security.getRealm();
    try {
    ((CachingRealm) basicRealm).clearCaches();
    } catch (ClassCastException ce) {
    out.println("There is a class cast exception and getRealm ain't no returned
    a CachingRealm");
    out.println("This probably means that you don't have a pluggable realm
    hooked into WebLogic.");
    out.println("No pluggable Realm = no Cachingrealm!");
    %>
    Is there anyway to clear a particular user from the cache. When the user's
    password
    is changed in the database, i would like to remove this user from the
    Caching
    realm. If i call authUserPassword() with incorrect password, will it
    remove the
    User object from Cache?
    Also, in a cluster, how do i remove the User from all WLS instances.
    thanks for your help.
    regards,
    Jegan
    "Tom Moreau" <[email protected]> wrote:
    Why do you need to clear the caching realm?
    Anyway, I think you can do it by (I haven't tried this):
    import weblogic.security.acl.Realm;
    import weblogic.security.acl.Security;
    import weblogic.security.acl.CachingRealm;
    Realm genericRealm = Security.getRealm();
    CachingRealm cachingRealm = (CachingRealm)genericRealm;
    cachingRealm.clearCaches();
    -Tom
    "Michael Saringer" <[email protected]> wrote:
    Hello,
    WebLogic Server 5.1 SP 6 on W2k Server
    Is it possible to emtpy the caching realm inside of an EJB?
    The class weblogic.security.acl.CachingRealm
    provides the clearCaches() method, but I don't know how
    to get the actual cache object within an EJB in the WebLogic
    server.
    Thanx in advance,
    Michael

  • Clear Metadata Cache

    I had an error that I have listed below and had to clear the metadata cache to fix it.  I do not have the metadata cache activated under user option so I am not sure why I had to clear the cache to get things working.  Can someone explain why I had to do this and where the metadata cache is located?
    Error:
    Index was out of range. Must be non-negative and less than the size of
    the collection.
    Parameter name: startindex

    Hello Jeroen,
    There is no other possibility. If you adjusted and reimported a RFC model, you need to restart the J2EE server.
    Regards,
    Christophe

  • Need to clear online cache

    HI, I've cleared all synced photos from my catalog. It removed 2gb of images.,I still have 8gb filled. I want to clear/delete the 8gb. Any suggestions would be welcomed. Thank you.

    "Clear the Cache": Edit > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    You can reload the page and bypass the cache with:
    * Press and hold Shift and left-click the Reload button.
    * Press Ctrl + F5 or press Shift + Ctrl + R (Windows,Linux)
    * Press Shift + Cmd + R (MAC)
    See [[Keyboard shortcuts]] and [[Mouse shortcuts]]
    See also [[Clear Recent History]]

Maybe you are looking for