Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PhpBackend.php

function PhpBackend::invalidateByHash

Invalidate one cache item.

Parameters

string $cidhash: The hashed version of the original cache ID after being normalized.

2 calls to PhpBackend::invalidateByHash()
PhpBackend::invalidate in core/lib/Drupal/Core/Cache/PhpBackend.php
Marks a cache item as invalid.
PhpBackend::invalidateAll in core/lib/Drupal/Core/Cache/PhpBackend.php
Marks all cache items as invalid.

File

core/lib/Drupal/Core/Cache/PhpBackend.php, line 207

Class

PhpBackend
Defines a PHP cache implementation.

Namespace

Drupal\Core\Cache

Code

protected function invalidateByHash($cidhash) {
    if ($item = $this->getByHash($cidhash)) {
        $item->expire = $this->time
            ->getRequestTime() - 1;
        $this->writeItem($cidhash, $item);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal