Skip to content

Instantly share code, notes, and snippets.

@nelson-ph
Created November 22, 2021 14:56
Show Gist options
  • Save nelson-ph/90b1e550eab2a2864c5eae26824643e3 to your computer and use it in GitHub Desktop.
Save nelson-ph/90b1e550eab2a2864c5eae26824643e3 to your computer and use it in GitHub Desktop.
Drupal - Redis - D9 readinness review
Index: src/Cache/CacheBase.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/Cache/CacheBase.php b/src/Cache/CacheBase.php
--- a/src/Cache/CacheBase.php
+++ b/src/Cache/CacheBase.php (date 1609972096000)
@@ -313,7 +313,7 @@
// Check expire time, allow to have a cache invalidated explicitly, don't
// check if already invalid.
if ($cache->valid) {
- $cache->valid = $cache->expire == Cache::PERMANENT || $cache->expire >= REQUEST_TIME;
+ $cache->valid = $cache->expire == Cache::PERMANENT || $cache->expire >= \Drupal::time()->getRequestTime();;
// Check if invalidateTags() has been called with any of the items's tags.
if ($cache->valid && !$this->checksumProvider->isValid($cache->checksum, $cache->tags)) {
Index: modules/redis_sessions/redis_sessions.info.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/modules/redis_sessions/redis_sessions.info.yml b/modules/redis_sessions/redis_sessions.info.yml
--- a/modules/redis_sessions/redis_sessions.info.yml
+++ b/modules/redis_sessions/redis_sessions.info.yml (date 1637592860219)
@@ -3,6 +3,6 @@
package: "Performance and scalability"
type: module
version: 1.0
-core: 8.x
+core_version_requirement: ^8.8 || ^9
dependencies:
- - redis
\ No newline at end of file
+ - redis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment