Skip to content

Commit 6d9948d

Browse files
author
Warren Buckley
authored
Fix incorrect backticks for code blocks
1 parent ad58f90 commit 6d9948d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -346,30 +346,30 @@ This tag helper element `<our-cache>` is a wrapper around the [DotNet CacheTagHe
346346

347347
Essentially this is a convenience for setting
348348

349-
'''cshtml
349+
```cshtml
350350
<cache enabled="!UmbracoContext.IsDebug && !UmbracoContext.InPreviewMode">[Your Long Running Expensive Code Here]</cache>
351-
'''
351+
```
352352

353353
### With this tag helper
354354

355-
'''cshtml
355+
```cshtml
356356
<our-cache>[Your Long Running Expensive Code Here]</our-cache>
357-
'''
357+
```
358358

359359
### Clearing the Cache 'on publish'
360360
The Umbraco convention with other Cache Helpers, eg Html.CachedPartial is to clear all memory caches whenever any item is published in the Umbraco Backoffice. By default the our-cache tag helper will do the same, however you can turn this part off on an individual TagHelper basis by setting update-cache-key-on-publish="false".
361361

362-
'''cshtml
362+
```cshtml
363363
<our-cache>[Your Long Running Expensive Code Here]</our-cache>
364-
'''
364+
```
365365
is the same as:
366-
'''cshtml
366+
```cshtml
367367
<our-cache update-cache-on-publish="true">[Your Long Running Expensive Code Here]</our-cache>
368-
'''
368+
```
369369
But to turn it off:
370-
'''cshtml
370+
```cshtml
371371
<our-cache update-cache-on-publish="false">[Your Long Running Expensive Code Here]</our-cache>
372-
'''
372+
```
373373

374374
(NB if you had a thousand tag helpers on your site, all caching large amounts of content, and new publishes to the site occurring every second - this might be detrimental to performance, so do think of the context of your site before allowing the cache to be cleared on each publish)
375375

0 commit comments

Comments
 (0)