You are here

public function ImageCaptionStorage::clearCache in Image Field Caption 8

Clears the cache for a certain field name.

Parameters

string $field_name: The field name of the image field, like 'field_image' or 'field_article_image'.

5 calls to ImageCaptionStorage::clearCache()
ImageCaptionStorage::deleteCaption in src/ImageCaptionStorage.php
Delete a caption from the database for the specified arguments.
ImageCaptionStorage::deleteCaptionRevision in src/ImageCaptionStorage.php
Delete a caption revision from the database for the specified arguments.
ImageCaptionStorage::deleteCaptionRevisions in src/ImageCaptionStorage.php
Delete all captions revisions for the specified arguments.
ImageCaptionStorage::insertCaption in src/ImageCaptionStorage.php
Insert a caption into the database for the specified arguments.
ImageCaptionStorage::insertCaptionRevision in src/ImageCaptionStorage.php
Insert a caption revision into the database for the specified arguments.

File

src/ImageCaptionStorage.php, line 365
Contains \Drupal\image_field_caption\ImageCaptionStorage.

Class

ImageCaptionStorage
Storage controller class for image captions.

Namespace

Drupal\image_field_caption

Code

public function clearCache($field_name) {
  $this->cacheTagsInvalidator
    ->invalidateTags([
    $field_name,
    'image_field_caption',
  ]);
}