mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #8415 from DorsetDigital/patch-8
Doc update - add FQCN to example code
This commit is contained in:
commit
89df5515ae
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user