]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Cache/Type/MemcachedCache.php
Merge pull request #11684 from MrPetovan/bug/11651-ap-fetch-queue
[friendica.git] / src / Core / Cache / Type / MemcachedCache.php
index 7aff735cedb45a3afa7ff2f4daf5dab56b140755..2d8b4e1c2f99d47a1540ddca7d8aecfe09e7fd1d 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
  *
@@ -93,6 +93,17 @@ class MemcachedCache extends AbstractCache implements ICanCacheInMemory
                }
        }
 
+       /**
+        * Memcached doesn't allow spaces in keys
+        *
+        * @param string $key
+        * @return string
+        */
+       protected function getCacheKey(string $key): string
+       {
+               return str_replace(' ', '_', parent::getCacheKey($key));
+       }
+
        /**
         * (@inheritdoc)
         */