-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
# Umbraco CDN Purge # | ||
|
||
A package which allows editors to purge CDN content in Umbraco 7. | ||
A package which allows editors to purge CDN content in Umbraco 7. Currently works with KeyCDN but if you are interested in support for other CDNs, please create an issue. | ||
|
||
## Configuration ## | ||
|
||
There are four app settings that need to be added: | ||
|
||
<add key="PurgeCdn" value="keycdn" /> | ||
<add key="PurgeCdnApiKey" value="API KEY" /> | ||
<add key="PurgeCdnZoneId" value="1234" /> | ||
<add key="PurgeCdnZoneUrl" value="ZONE URL" /> | ||
<add key="PurgeCdnMethod" value="tag" /> | ||
|
||
Currently this just supports KeyCDN, so the first app setting is not used, but when support for other CDNs are added, it will be used to determine which CDN API to call. | ||
|
||
`PurgeCdnMethod` values can be `tag` or `url`. When set to `tag`, it will use the tag `node-x` where x is the id of the node. When purging call content, it will use the tag `umbhtml`. For this to work, you need to add an HTTP header to your pages. For KeyCDN, you can do this as follows: | ||
|
||
Response.AddHeader("Cache-Tag", "umbhtml node-" + Model.Id); | ||
|
||
When `PurgeCdnMethod` is set to `url`, it will purge by all the URLs (as returned by the current UrlProvider). |