 
      (if (get @cached-queries  query-key)
        nil
-       (update-query-in-cache  query-key)
-
-       )
+       (do
+         (update-query-in-cache  query-key)
+         (add-client-to-query  query-key  data-session-id)
+         ))
 
      (do-real   :table-name db-table)
 

      (println (str "    " query))

      (if (not existing-query)
        (swap! cached-queries assoc  query (atom {})))

      (let [the-query        (get @cached-queries   query)
            ]
        (swap! the-query assoc  :records      result-id-vector)
        (swap! the-query assoc  :count        record-count)
        (swap! the-query assoc  :timestamp    (java.util.Date.))
        ))))


(defn add-client-to-query [query  client-id]
  (let [
        existing-query     (get @cached-queries   query)
        existing-clients   (get @existing-query  :clients)
        ]
        (swap! existing-clients conj client-id)
        ))



