protected function delete_many_connection(Memcached $connection, array $keys) {
        $count = 0;
        if ($this->candeletemulti) {
            // We can use deleteMulti, this is a bit faster yay!
            $result = $connection->deleteMulti($keys);
            foreach ($result as $key => $outcome) {
                if ($outcome === true) {
                    $count++;
                }
            }
            return $count;
        }

        // They are running an older version of the php memcached extension.
        foreach ($keys as $key) {
            if ($connection->delete($key)) {
                $count++;
            }
        }
        return $count;
    }