You are here

public function ProductAttributeFieldManager::clearCaches in Commerce Core 8.2

Clears the attribute field map and definition caches.

Overrides ProductAttributeFieldManagerInterface::clearCaches

2 calls to ProductAttributeFieldManager::clearCaches()
ProductAttributeFieldManager::createField in modules/product/src/ProductAttributeFieldManager.php
Creates an attribute field for the given attribute.
ProductAttributeFieldManager::deleteField in modules/product/src/ProductAttributeFieldManager.php
Deletes the attribute field for the given attribute.

File

modules/product/src/ProductAttributeFieldManager.php, line 124

Class

ProductAttributeFieldManager
Default implementation of the ProductAttributeFieldManagerInterface.

Namespace

Drupal\commerce_product

Code

public function clearCaches() {
  $this->fieldDefinitions = [];
  $this->fieldMap = NULL;
  $this->cache
    ->delete('commerce_product.attribute_field_map');
}