Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function updateSettingsFields(FieldList $fields) |
||
26 | { |
||
27 | $fields->addFieldsToTab( |
||
28 | 'Root.Cache', |
||
29 | [ |
||
30 | CheckboxField::create('NeverCachePublicly', 'Never cache this page publicly (so that all users see the same page)'), |
||
31 | NumericField::create( |
||
32 | 'PublicCacheDurationInSeconds', |
||
33 | 'Number of caching seconds for public users (0 = no caching)' |
||
34 | ) |
||
35 | ->setDescription( |
||
36 | ' |
||
37 | Use with care! |
||
38 | This should only be used on pages that should be the same for all users and that should be accessible publicly. |
||
39 | You can also set this value <a href="/admin/settings#Root_Caching">for the whole site</a> . |
||
40 | The current value is ' . SiteConfig::current_site_config()->PublicCacheDurationInSeconds . ' seconds.' |
||
41 | ), |
||
47 |