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 97 posts 325 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 2045 posts 7034 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 489 posts 2048 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 97 posts 325 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 68 posts 393 karma points
    21 days ago
    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