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

Breadcrumb

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

function CacheItemInterface::expiresAfter

Sets the expiration time for this cache item.

Parameters

int|\DateInterval|null $time: The period of time from the present after which the item MUST be considered expired. An integer parameter is understood to be the time in seconds until expiration. If null is passed explicitly, a default value MAY be used. If none is set, the value should be stored permanently or for as long as the implementation allows.

Return value

static The called object.

File

vendor/psr/cache/src/CacheItemInterface.php, line 104

Class

CacheItemInterface
CacheItemInterface defines an interface for interacting with objects inside a cache.

Namespace

Psr\Cache

Code

public function expiresAfter(int|\DateInterval|null $time) : static;

API Navigation

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