@@ -79,7 +79,7 @@ |
||
| 79 | 79 | 'You will also need to set up the cache time below for it to be enabled. |
| 80 | 80 | You can set a default time below, but you can also set the time for individual pages.' |
| 81 | 81 | ), |
| 82 | -<<<<<<< HEAD |
|
| 82 | +<< << <<< HEAD |
|
| 83 | 83 | ======= |
| 84 | 84 | ReadonlyField::create('CacheKeyLastEditedNice', 'Last database change', $owner->dbObject('CacheKeyLastEdited')?->ago()) |
| 85 | 85 | ->setDescription('The frontend template cache will be invalidated every time this value changes. It changes every time anything is changed in the database.'), |
@@ -21,9 +21,9 @@ discard block |
||
| 21 | 21 | // NB. |
| 22 | 22 | // if the dataobject has the versioned extension then the cache should be invalidated onAfterPublish |
| 23 | 23 | // hasStages function is part of the Versioned class so safe to check here |
| 24 | - if (! $owner->hasExtension(Versioned::class)) { |
|
| 24 | + if (!$owner->hasExtension(Versioned::class)) { |
|
| 25 | 25 | $this->doUpdateCache(); |
| 26 | - } elseif (! $owner->hasStages()) { |
|
| 26 | + } elseif (!$owner->hasStages()) { |
|
| 27 | 27 | $this->doUpdateCache(); |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -94,6 +94,6 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | $excludedClasses = (array) Config::inst()->get(DataObjectExtension::class, 'excluded_classes_for_caching'); |
| 96 | 96 | |
| 97 | - return ! in_array($className, $excludedClasses, true); |
|
| 97 | + return !in_array($className, $excludedClasses, true); |
|
| 98 | 98 | } |
| 99 | 99 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | ), |
| 37 | 37 | ] |
| 38 | 38 | ); |
| 39 | - if (! (bool) $owner->NeverCachePublicly) { |
|
| 39 | + if (!(bool) $owner->NeverCachePublicly) { |
|
| 40 | 40 | $fields->addFieldsToTab( |
| 41 | 41 | 'Root.Cache', |
| 42 | 42 | [ |
@@ -105,7 +105,6 @@ discard block |
||
| 105 | 105 | public function PageCanBeCachedEntirelyDuration(): int |
| 106 | 106 | { |
| 107 | 107 | return (int) ( |
| 108 | - $this->getOwner()->PublicCacheDurationInSeconds ?: |
|
| 109 | - SiteConfig::current_site_config()->PublicCacheDurationInSeconds); |
|
| 108 | + $this->getOwner()->PublicCacheDurationInSeconds ?: SiteConfig::current_site_config()->PublicCacheDurationInSeconds); |
|
| 110 | 109 | } |
| 111 | 110 | } |
@@ -24,11 +24,11 @@ |
||
| 24 | 24 | ORDER BY "ClassNameLastEdited" ASC |
| 25 | 25 | '); |
| 26 | 26 | foreach ($query as $row) { |
| 27 | - $array[$row['ClassNameLastEdited']] = |
|
| 28 | - Injector::inst()->get($row['ClassNameLastEdited'])->i18n_singular_name() . |
|
| 29 | - ' (×' . $row['Count'] . ')'; |
|
| 30 | - if ($myClass && $myClass === $row['ClassNameLastEdited']) { |
|
| 31 | - return $row['Count']; |
|
| 27 | + $array[ $row[ 'ClassNameLastEdited' ] ] = |
|
| 28 | + Injector::inst()->get($row[ 'ClassNameLastEdited' ])->i18n_singular_name() . |
|
| 29 | + ' (×' . $row[ 'Count' ] . ')'; |
|
| 30 | + if ($myClass && $myClass === $row[ 'ClassNameLastEdited' ]) { |
|
| 31 | + return $row[ 'Count' ]; |
|
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | return '<br />' . implode('<br> ', $array); |