Merge pull request #8415 from DorsetDigital/patch-8

Doc update - add FQCN to example code
This commit is contained in:
Loz Calver 2018-09-27 11:29:42 +02:00 committed by GitHub
commit 89df5515ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,13 +63,13 @@ otherwise. By using aggregates, we do that like this:
```ss
<% cached 'navigation', $List('SiteTree').max('LastEdited'), $List('SiteTree').count() %>
<% cached 'navigation', $List('SilverStripe\CMS\Model\SiteTree').max('LastEdited'), $List('SilverStripe\CMS\Model\SiteTree').count() %>
```
The cache for this will update whenever a page is added, removed or edited.
The cache for this will update whenever a page is added, removed or edited. (Note: The use of the fully qualified classname is necessary).
If we have a block that shows a list of categories, we can make sure the cache updates every time a category is added
or edited
or edited:
```ss