This commit is contained in:
Gered 2022-01-02 19:43:53 -05:00
parent c95a02270a
commit 175cc5dca3

View file

@ -65,11 +65,10 @@
SessionStore SessionStore
(read-session [_ key] (read-session [_ key]
(when (contains? @session-atom key) (when (contains? @session-atom key)
(let [] (swap! session-atom sweep-entry ttl key)
(swap! session-atom sweep-entry ttl key) (when (and refresh-on-read (contains? @session-atom key))
(when (and refresh-on-read (contains? @session-atom key)) (swap! session-atom assoc-in [key :timestamp] (now)))
(swap! session-atom assoc-in [key :timestamp] (now))) (get-in @session-atom [key :value])))
(get-in @session-atom [key :value]))))
(write-session [_ key data] (write-session [_ key data]
(let [key (or key (unique-id))] (let [key (or key (unique-id))]