U4-10503 - Umbraco plugins cache files should be stored in the same local temp location as the umbraco xml cache file

Created by Shannon Deminick 06 Oct 2017, 00:30:53 Updated by Sebastiaan Janssen 14 Nov 2017, 10:57:01

Tags: Unscheduled Gold partner

Relates to: U4-10213

Subtask of: U4-9609

These files are machine/IIS instance specific - meaning these files are not replicated between server nodes for the same website, each server manages these files on their own. On Azure it's recommended to store the umbraco xml cache file in the local 'fast drive' and that is also where the plugin cache files should be stored too.

So we'll replace the current umbracoContentXMLStorage appSetting with umbracoLocalTempStorage which will be used going forward (but we'll have backwards compat checks so no breaking changes)

In some cases we've seen that an exception can be caused on Azure with a file lock on the plugins file:

Access to the path '....\umbraco-plugins.machinename.list' is denied

Which occurs when deleting the file when hashes have changed. If this file is stored locally on the fast drive then there should be no contention with whatever Azure is doing behind the scenes.

1 Attachments


Shannon Deminick 06 Oct 2017, 01:12:17

PR https://github.com/umbraco/Umbraco-CMS/pull/2231

For testing:

  • Add the appsetting umbracoLocalTempStorage and set this to EnvironmentTemp

  • run the website

  • in file exporer go to this location in your address bar: %temp% and you'll see these files (see image)

  • Then delete the normal App_Data/umbraco.config and the App_Data/TEMP/PluginCache

  • Remove the appsetting

  • Reload the site and the files will be put back into their normal place: App_Data/umbraco.config and the App_Data/TEMP/PluginCache

Warren Buckley 06 Oct 2017, 12:27:09

Code all reads fine & test works as described. As due in version not set @Shandem I assume it's due for next patch in 7.7.3 then?

All merged in :)

Shannon Deminick 09 Oct 2017, 03:21:19

Thanks warren! Jeavon had some mroe feedback for me so will make some additional tweaks.

Shannon Deminick 09 Oct 2017, 03:51:50

Round #2 :) https://github.com/umbraco/Umbraco-CMS/pull/2233

Warren Buckley 09 Oct 2017, 13:04:38

All happy & merged in

Sebastiaan Janssen 25 Oct 2017, 12:16:39

These PRs have also been manually applied to 7.6 now: https://github.com/umbraco/Umbraco-CMS/commit/f0b5c831f13725afe32a67bab109e935d9988d40

You can see from merging 7.6 into 7.7 that it was a clean merge, apart from some whitespace changes: https://github.com/umbraco/Umbraco-CMS/commit/f766057e5005e0bc251a5912882f08056b61efc4?w=1

Priority: Normal

Type: Task

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.7.3, 7.6.12

Sprint: Sprint 69

Story Points: 1

Cycle: 5