Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mongodb
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
mongodb
Commits
18b92564
Commit
18b92564
authored
2 months ago
by
daffie
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3506118
by daffie: Update the CacheTagsChecksumTrait to work with Redis
parent
c523d857
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!40
Update the CacheTagsChecksumTrait to work with Redis
Pipeline
#422182
failed
2 months ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
patches/drupal-core-11.1.2.patch
+3
-3
3 additions, 3 deletions
patches/drupal-core-11.1.2.patch
with
3 additions
and
3 deletions
patches/drupal-core-11.1.2.patch
+
3
−
3
View file @
18b92564
...
@@ -203,7 +203,7 @@ index 46f9fb97c0d6359da0cbd84279ba4bdd92b77523..fbc1d8dda75fbd8df70a779b60ab3103
...
@@ -203,7 +203,7 @@ index 46f9fb97c0d6359da0cbd84279ba4bdd92b77523..fbc1d8dda75fbd8df70a779b60ab3103
}
}
diff --git a/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php b/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php
diff --git a/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php b/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php
index 00bf806c3dee1df743646160e9f5110fdb3034b4..
8893c3e25981d8378c26dab25fd14292ae80feeb
100644
index 00bf806c3dee1df743646160e9f5110fdb3034b4..
9eb5b0471e67fa197ce2a0acf968c4ad688ee060
100644
--- a/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php
--- a/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php
+++ b/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php
+++ b/core/lib/Drupal/Core/Cache/CacheTagsChecksumTrait.php
@@ -32,6 +32,15 @@ trait CacheTagsChecksumTrait {
@@ -32,6 +32,15 @@ trait CacheTagsChecksumTrait {
...
@@ -226,7 +226,7 @@ index 00bf806c3dee1df743646160e9f5110fdb3034b4..8893c3e25981d8378c26dab25fd14292
...
@@ -226,7 +226,7 @@ index 00bf806c3dee1df743646160e9f5110fdb3034b4..8893c3e25981d8378c26dab25fd14292
* Implements \Drupal\Core\Cache\CacheTagsInvalidatorInterface::invalidateTags()
* Implements \Drupal\Core\Cache\CacheTagsInvalidatorInterface::invalidateTags()
*/
*/
public function invalidateTags(array $tags) {
public function invalidateTags(array $tags) {
+ if (($this->connection->driver() == 'mongodb') && !$this->tableExists) {
+ if (
isset($this->connection) &&
($this->connection->driver() == 'mongodb') && !$this->tableExists) {
+ // For MongoDB the table needs to exist. Otherwise MongoDB creates one
+ // For MongoDB the table needs to exist. Otherwise MongoDB creates one
+ // without the correct validation.
+ // without the correct validation.
+ $this->tableExists = $this->ensureTableExists();
+ $this->tableExists = $this->ensureTableExists();
...
@@ -240,7 +240,7 @@ index 00bf806c3dee1df743646160e9f5110fdb3034b4..8893c3e25981d8378c26dab25fd14292
...
@@ -240,7 +240,7 @@ index 00bf806c3dee1df743646160e9f5110fdb3034b4..8893c3e25981d8378c26dab25fd14292
* Implements \Drupal\Core\Cache\CacheTagsChecksumInterface::getCurrentChecksum()
* Implements \Drupal\Core\Cache\CacheTagsChecksumInterface::getCurrentChecksum()
*/
*/
public function getCurrentChecksum(array $tags) {
public function getCurrentChecksum(array $tags) {
+ if (($this->connection->driver() == 'mongodb') && !$this->tableExists) {
+ if (
isset($this->connection) &&
($this->connection->driver() == 'mongodb') && !$this->tableExists) {
+ // For MongoDB the table needs to exist. Otherwise MongoDB creates one
+ // For MongoDB the table needs to exist. Otherwise MongoDB creates one
+ // without the correct validation.
+ // without the correct validation.
+ $this->tableExists = $this->ensureTableExists();
+ $this->tableExists = $this->ensureTableExists();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment