Convert the contact fields cache group to standard cache backend
[civicrm-core.git] / CRM / Core / BAO / CustomField.php
index f6dce2967db19f30d7bed20bfbd6489b8c822273..6b704a2d85eda1aa62bca8661fe41d2d9788452e 100644 (file)
@@ -401,7 +401,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
       }
 
       // check if we can retrieve from database cache
-      $fields = CRM_Core_BAO_Cache::getItem('contact fields', "custom importableFields $cacheKey");
+      $fields = Civi::Cache('fields')->get("custom importableFields $cacheKey");
 
       if ($fields === NULL) {
         $cfTable = self::getTableName();
@@ -547,10 +547,7 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
 
         }
 
-        CRM_Core_BAO_Cache::setItem($fields,
-          'contact fields',
-          "custom importableFields $cacheKey"
-        );
+        Civi::cache('fields')->set("custom importableFields $cacheKey", $fields);
       }
       self::$_importFields[$cacheKey] = $fields;
     }