I’m starting to implement Partial Caching in my project and I am not sure I understand how to select appropriate logic for the $CacheCondition.
From the Docs:
Although
$CacheCondition
is optional, it is highly recommended. For example, if you use$DataObject->ID
as your$CacheKey
, you may use$DataObject->ID > 0
as the condition.
So what $CacheConditon, if any, should be applied to the following example from the docs?
<% cached
'navigation',
$List('SilverStripe\CMS\Model\SiteTree').max('LastEdited'),
$List('SilverStripe\CMS\Model\SiteTree').count()
%>
If it would be none, please could someone explain why?
Many thanks!