\Drupal\Core\Cache\MemoryBackend should not use request time for checking expire time

Created on 25 October 2024, about 2 months ago

Problem/Motivation

This condition is basically useless.

// Check expire time.
$prepared->valid = $prepared->expire == Cache::PERMANENT || $prepared->expire >= $this->time->getRequestTime();

The cache will never expire within a single HTTP request in fpm-fcgi or cli SAPI.

Proposed resolution

Use $this->time->getCurrentTime() instead.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

cache system

Created by

πŸ‡·πŸ‡ΊRussia Chi

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024