Copied to clipboard

Flag this post as spam?

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


  • Luke 10 posts 132 karma points
    Apr 03, 2024 @ 04:31
    Luke
    0

    Custom App Plugin Backoffice Cache issue Umbraco 13

    Hey, I am trying to create a custom plugin in the App_Plugins folder Using Umbraco 13. I have followed the the official umbraco documentation

    to setup a custom plugin, and everything is working fine. However, the controller.js file seems to be cached and whatever I do, it is not updating. I tried renaming the file, adding a url parameter (?v=2), clearing cache, disabling chrome cache, refreshing IIS application pool, I even tried deleting the file, and it is still loading the cached version.

    Any help is greatly apricated, as this is driving me mad.

    Cheers

  • Owain Jones 60 posts 410 karma points MVP 4x c-trib
    Apr 03, 2024 @ 10:58
    Owain Jones
    100

    Hi Luke,

    Could you try setting bundleOptions to None in your package's package.manifest file?

    By default, Umbraco will bundle all backoffice JS files together, including package js files, (iirc it uses Smidge for bundling) and this tells Umbraco to not do that and instead serve your package files "as is".

    Here's the documentation on this: https://docs.umbraco.com/umbraco-cms/extending/property-editors/package-manifest#bundling

    Umbraco's caching in the backoffice is quite strong, I sometimes find I need to do a "Empty cache and hard refresh" to get it to load updated files.

    I usually do this by opening your browser's DevTools (F12), and right clicking the refresh button. (should work on all chromium based browsers, I haven't tested on Firefox)

  • Luke 10 posts 132 karma points
    Apr 03, 2024 @ 20:09
    Luke
    0

    Amazing, thank so much Owain! The bundleOptions: None worked a treat.

Please Sign in or register to post replies

Write your reply to:

Draft