Submit a request

Provide the ability 'un-cache' time critical data

Answered

Comments

1 comment

  • Avatar
    AmeriCommerce Developer

    Only static files are cached at Cloudflare, so the dynamic product page would only have small elements that are cached and shouldn't be caching things that are dynamically rendered (aka stock status and pricing).  We do however cache the 'data' of a product on the webserver locally just to avoid repeated lookups within a very small window.  This may be what you're seeing stick around.  Saving a product, system updates to that product or clearing cache all wipe that information out.  However, the API likely does not, since that is an entirely separate application that is separated in many ways from the application that serves your store.  So the api has troubles talking to the web app to clear that cache.

    With all of that fun context, lol, I agree, a feature to auto-clear when the api changes the product would be ideal.  Or at least a way to clear the cache via your api calls when you're 'done'.  We do have a way to do the latter.  This post should focus on the idea of doing it automagically.

    As for clearing it after you're done changing products/inventory programatically, you can use option 2 here: https://support.americommerce.com/hc/en-us/articles/203052310-Changes-not-Showing-Clear-Cache-Purge-CDN

    Just make a web request via your code to that url (not after every save, but periodically when you've done a large batch ideally).  If you have multiple stores, you'll have to do it for each store.  This will clear the application cache. I believe this does not clear the Cloudflare CDN cache (not sure on that). 

    Hope this helps! 

    0
    Comment actions Permalink

Please sign in to leave a comment.

We're Here To Help


Standard Support Hours: Monday-Friday 8AM-6PM CST
Looking for Premium Support? Just ask!

Speak to a live person
1 (800) 936-9006
Submit A Support Ticket
Submit Your Ticket Here