From a81aabdb6ae5f7109cb388a1c92a3e8698b57cad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 25 Jul 2013 02:29:26 +0000 Subject: [PATCH] Possible "fix" for wrong cache key: - $onlyKeys allows to set database table columns that shall be used for creating a cache key, this can be used to look for a node id/ip/port combination instead of the default session id. --- .../class_NodeDistributedHashTableDatabaseWrapper.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php b/application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php index 0beb31c0d..7870e0c22 100644 --- a/application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php @@ -284,7 +284,16 @@ class NodeDistributedHashTableDatabaseWrapper extends BaseDatabaseWrapper implem $searchInstance->setLimit(1); // Query database and get a result instance back - $resultInstance = $this->doSelectByCriteria($searchInstance); + $resultInstance = $this->doSelectByCriteria( + // Search instance + $searchInstance, + // Only look for these array elements ("keys") + array( + self::DB_COLUMN_NODE_ID, + self::DB_COLUMN_EXTERNAL_IP, + self::DB_COLUMN_LISTEN_PORT, + ) + ); // Check if there is an entry $isRegistered = $resultInstance->valid(); -- 2.39.5