Enhanced UmbracoFlare for v7.15 With Added Features Released

Enhanced UmbracoFlare for v7.15 With Added Features Released

ProWorks recently had a client request that we get UmbracoFlare, the Cloudflare management package by The Scylla Group, working with Umbraco version 7.15.x.  There were a few bug fixes needed, and we did some code specific to the client, but the result is something that we would like to release to the community to help anyone else wanting to use this great package with the latest v7 versions.

We are offering the ProWorks build of this package as-is, and we are sharing the source code for anyone who would like to just see what fixes were done.

Nuget screenshot of ProWorks.UmbracoFlare package

In addition to the bug fixes, we added two new features that also might be helpful to some.  These allow for purging related nodes in these scenarios:

  1. Nodes that should always be purged anytime anything changes, such as a search page or possible a home page

  2. Nodes that should be purged when one of their descendants is changed, such as a landing page which references those descendant node

Let's look briefly at how you configure these two new features.  Both are configured by adding new XML elements into the same config/cloudflare.config file that UmbracoFlare uses.

<cloudflare>
<alwaysPurgeNodes>
<alwaysPurge key="5c5c522e-30df-4605-84d3-b75aecc3a542" referencePath="Home / Search" />
</alwaysPurgeNodes>
<ancestorPurgeTypes>
<documentType alias="landingPage" purgeAllChildren="true" />
<documentType alias="employeeDirectory" purgeAllChildren="false" />
</ancestorPurgeTypes>
</cloudflare>


alwaysPurgeNodes

For nodes that should always be purged, you add a node appropriately called alwaysPurge.  The node requires a key attribute that is the GUID key of the node which should be purged.  The URL for these nodes will be included anytime a purge request is sent for any other reason.  The node also allows for an optional referencePath attribute which you can use to provide someone looking at the config context on where to find the node in the Umbraco back-office.  It just makes it easier to figure out which nodes you've put in there when you come back later.


ancestorPurgeTypes

For nodes that are purged when a descendent page is purged, you add a node group called ancestorPurgeTypes with child nodes called documentType.  For each documentType node, you provide an alias attribute to say which document type nodes should be purged when their children are purged.  You can also provide a purgeAllChildren attribute with a value of true or false, which indicates if, when that document type node is triggered to be purged because a descendant changed, do you want all child nodes to also be purged.

 

Both of these combine to add some new features that can be helpful in various scenarios.  In addition, the bug fixes can help anyone wanting to run UmbracoFlare on the latest v7 versions.  Hopefully it helps someone out there!

Author

Benjamin

comments powered by Disqus
back to top