]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Cache/Type/MemcacheCache.php
Merge pull request #11684 from MrPetovan/bug/11651-ap-fetch-queue
[friendica.git] / src / Core / Cache / Type / MemcacheCache.php
index a8a183daab9d55c2c90bdb581355bd4823571d24..225c338911715c06205f2eae3c4100f07652bcc4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -68,6 +68,17 @@ class MemcacheCache extends AbstractCache implements ICanCacheInMemory
                }
        }
 
+       /**
+        * Memcache doesn't allow spaces in keys
+        *
+        * @param string $key
+        * @return string
+        */
+       protected function getCacheKey(string $key): string
+       {
+               return str_replace(' ', '_', parent::getCacheKey($key));
+       }
+
        /**
         * (@inheritdoc)
         */