+ /**
+ * @brief Returns all the cache keys sorted alphabetically
+ *
+ * @return array|null Null if the driver doesn't support this feature
+ */
+ public static function getAllKeys()
+ {
+ $time = microtime(true);
+
+ $return = self::getDriver()->getAllKeys();
+
+ // Keys are prefixed with the node hostname, let's remove it
+ array_walk($return, function (&$value) {
+ $value = preg_replace('/^' . self::getApp()->get_hostname() . ':/', '', $value);
+ });
+
+ sort($return);
+
+ self::getApp()->save_timestamp($time, 'cache');
+
+ return $return;
+ }
+