Copied to clipboard

Flag this post as spam?

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


  • Ben 5 posts 86 karma points
    May 30, 2023 @ 10:42
    Ben
    0

    Strange caching behaviour with custom property editor.

    Hello,

    I am in the proccess of refactoring a custom property editor so that it will work with Umbraco 10 (from version 7). The problem I'm having is that there seems to be some strange caching behaviour for the AppPlugins/view.html

    The controller is reflecting changes made to it fine after clearing the browser cache but the problem is that the view isn't updating.

    I have a bunch of code commented out which is still being rendered to the screen. As you can imagine, this has made the process of refactoring the angular code extremely frustrating.

    Here is a list of things I have tried to do to resolve this.

    1. Clear browser cache.
    2. Clean solution in Rider.
    3. Delete umbraco/Data/TEMP folder.
    4. Rebuild/Run/Debug solution.
    5. Add "?v=1.0" to the end of the view.html in package.manifest.
    6. Reboot PC (yes I know).

    Has anyone experienced this issue when writing/refactoring custom property editors for backoffice?

    Any suggestions about how I might resolve this?

  • Ben 5 posts 86 karma points
    May 30, 2023 @ 15:18
    Ben
    0

    I managed to resolve this issue with the aid of a browser extension called clear cache. I was using the built in browser options of clear cache which wasn'd doing anything. If you opened the dev tools and looked at the network tab - it was still accesing the cached file despite it just being cleared.

    The firefox extension clear cache must do some sort of harder reset because it works perfectly now.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    May 30, 2023 @ 15:45
    Lee Kelleher
    100

    Hi Ben,

    I haven't used Firefox in a while, but wondering if it has the same option as in Chrome devtools to disable the cache (on the Network panel)?

    Screengrab of Chrome DevTools Network panel, with "Disable cache" option enabled

    This is what I usually use when developing packages locally.

    Cheers,
    - Lee

  • Ben 5 posts 86 karma points
    May 30, 2023 @ 15:48
    Ben
    1

    Thanks for the tip I think this is a better solution so I'll mark it as solved.

    Thanks, Ben

Please Sign in or register to post replies

Write your reply to:

Draft