civicrm_cache - Add index on `expired_date`
authorTim Otten <totten@civicrm.org>
Tue, 21 Mar 2023 04:55:38 +0000 (21:55 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 21 Mar 2023 04:55:38 +0000 (21:55 -0700)
CRM/Core/DAO/Cache.php
CRM/Upgrade/Incremental/php/FiveSixtyOne.php
xml/schema/Core/Cache.xml

index 71f4552d312f0b66b74e53e6e3bdd331fa3a2a95..811227f421a0d9c7991d80d9b85d2140b1933a7e 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Generated from xml/schema/CRM/Core/Cache.xml
  * DO NOT EDIT.  Generated by CRM_Core_CodeGen
- * (GenCodeChecksum:7ef203eece225df98205318c7162ebd1)
+ * (GenCodeChecksum:5d62ee8a59b8af12078317776d33877c)
  */
 
 /**
@@ -321,6 +321,14 @@ class CRM_Core_DAO_Cache extends CRM_Core_DAO {
         'unique' => TRUE,
         'sig' => 'civicrm_cache::1::group_name::path',
       ],
+      'index_expired_date' => [
+        'name' => 'index_expired_date',
+        'field' => [
+          0 => 'expired_date',
+        ],
+        'localizable' => FALSE,
+        'sig' => 'civicrm_cache::0::expired_date',
+      ],
     ];
     return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices;
   }
index c621f9b55e81bfe8b63f81e7fe5845a0cbf14639..31b99a7965b0199411bf49a911f9a4f6c2764100 100644 (file)
@@ -49,6 +49,7 @@ class CRM_Upgrade_Incremental_php_FiveSixtyOne extends CRM_Upgrade_Incremental_B
     $this->addTask(ts('Dedupe cache table'), 'dedupeCache');
     $this->addTask(ts('Drop index %1', [1 => 'civicrm_cache.UI_group_path_date']), 'dropIndex', 'civicrm_cache', 'UI_group_path_date');
     $this->addTask(ts('Create index %1', [1 => 'civicrm_cache.UI_group_name_path']), 'addIndex', 'civicrm_cache', [['group_name', 'path']], 'UI');
+    $this->addTask(ts('Create index %1', [1 => 'civicrm_cache.index_expired_date']), 'addIndex', 'civicrm_cache', [['expired_date']], 'index');
   }
 
   /**
index 9e69ada0f16adfac344a1d827a8d0cd77e1a0a6c..71611853cfa9f8cfac7ded9faf1fe0296bbb98b6 100644 (file)
     <comment>When should the cache item expire</comment>
     <add>2.1</add>
   </field>
+  <index>
+    <name>index_expired_date</name>
+    <fieldName>expired_date</fieldName>
+    <add>5.61</add>
+  </index>
 </table>