U4-9382 - Dashboard to clear ClientDependency cache (and possibly other caches as well)

Created by Anders Bjerner 13 Jan 2017, 15:27:19 Updated by Kevin Jump 20 Jan 2017, 16:27:27

When deploying backoffice changes to an Umbraco installation, changes typically don't take show since ClientDependency will cache JS and CSS files pretty hard.

Usually we have connected to the solution via RDP or FTP and updated the counter in ClientDependency.config, but you kinda grow tired of this when you have done it enough times.

So I made a dashboard for it (see screenshot):

Clicking the button will delete all files in ~/App_Plugins/TEMP/ClientDependency/, which ultimately will force ClientDependency to rebuild it's cache.

Shouldn't something like this be added to the core? If so, I will look into making a pull request ;)

My thought was that a "Caching" or "Cache" tag is added to the Developer dashboard, so it could possible also contain buttons for other types of caching (if there are any relevant).

Also, currently I'm just clearing the files using the Directory and File classes in .NET - are there any better ways of clearing the ClientDependency cache build directly into the framework?

2 Attachments


Lars-Erik Aabech 13 Jan 2017, 15:37:47

It should rather bump the version number in the clientdependency.config file. That way, clients will also be able to refresh their cache. Better yet, commit the new clientdependency.config file to whichever SCM you're using. ;)

Here's what we do when we use MS web publish: https://github.com/lars-erik/bump-clientdependency-on-publish

Kevin Jump 13 Jan 2017, 15:48:57

I have the beginnings of a Health check package to do this - i don't think it should be Yet Another Dashboard Tab (YADT?)


Anders Bjerner 13 Jan 2017, 15:52:48

@KevinJump Yours seems like the best solution ;)

Then perhaps your health check should be added to the core? Seems to be quite polished :D

Kevin Jump 13 Jan 2017, 16:29:57

it needs some language files stuff, and i need to get the location of scripts and css from the site config (hardwired at the moment) and then it would be a bit more robust.

Kevin Jump 20 Jan 2017, 16:27:27

the package for this health checker is now out - https://www.nuget.org/packages/Jumoo.CdfHealthChecker/ I am happy for any code to go into a core thing if needed , but i suspect the "is this a health check or not" debate is probibly something that would need to happen first :)

Priority: Normal

Type: Feature (request)

State: Submitted


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: