protected static function get_prefixed_keys(Memcached $connection, $prefix) {
        $connkeys = $connection->getAllKeys();
        if (empty($connkeys)) {
            return array();
        }

        $keys = array();
        $start = strlen($prefix);
        foreach ($connkeys as $key) {
            if (strpos($key, $prefix) === 0) {
                $keys[] = substr($key, $start);
            }
        }
        return $keys;
    }