Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Patrick van Kemenade 101 posts 339 karma points
    Jan 10, 2021 @ 19:54
    Patrick van Kemenade
    0

    Clearing cache when developing a plugin

    What is an easy way to clear the cache while developing a plugin.

    So far the only thing that always seem to work is editing the package.manifest

    And in the link, for instance:

    /app_plugins/js/myjsfile.js?v=102

    And then every time update v=xxx to a higher number. Same for the .html and .css

    But there must be an easier way.

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Jan 10, 2021 @ 20:21
    Nicholas Westby
    101

    I feel like I usually don't have a problem, so maybe something about my configuration ensures this (it's been a few weeks since I've had to make any back office changes though, so maybe I'm not remember things correctly). Some things I do that may or may not help you:

    • I debug from Visual Studio (rather than from IIS).
    • The web.config is set to have debug be true.
    • I have the Chrome inspector open and the browser is set to have caching disabled.

    BTW, I've gotten into trouble before setting a query string in the package.manifest file. I think there was some problem with ClientDepenency or something. Might have been a temporary issue, but thought I'd give you a heads up.

  • David Armitage 505 posts 2073 karma points
    Jan 08, 2022 @ 05:50
    David Armitage
    0

    Hi Nicholas,

    Thanks. This was driving me insane. I never really had any problems but it looks like Chrome may have upgraded their caching recently. I just could not get this to clear whatever I did.

    You comment set me in the right direction.

    "I have the Chrome inspector open and the browser is set to have caching disabled."

    Hope this screen shot helps someone further. This was an instant fix.

    enter image description here

    Also this link helps but it didn't help that much for Chrome. Still it is a handle extension to the backend health checks.

    https://our.umbraco.com/packages/developer-tools/health-check-for-client-dependency-framework/

  • Patrick van Kemenade 101 posts 339 karma points
    Jan 10, 2021 @ 21:06
    Patrick van Kemenade
    0

    Thanks, I didn't set the cache disabled in Chrome DevTools that helped.

  • AbsolutelyN 85 posts 433 karma points
    Nov 09, 2022 @ 00:19
    AbsolutelyN
    0

    This works but umbraco could use a better way to clear cache for backoffice plugins. If you have a bug or change and need to release a patch it can be painfully uncertain if the change will pull through. I set cache expire immediately on plugin folder, delete caches, use inmemorycache and still regularly have issues - telling clients to go into developer tools and disable cache is not a good solution

      "RuntimeMinification": {
        "UseInMemoryCache": true,
        "CacheBuster": "AppDomain",
        "Version": "0.05"
      },
    
Please Sign in or register to post replies

Write your reply to:

Draft