This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-19
Channels
- # adventofcode (1)
- # announcements (3)
- # babashka (60)
- # beginners (60)
- # calva (5)
- # clj-commons (17)
- # clj-kondo (33)
- # clj-on-windows (1)
- # clojure (40)
- # clojure-austin (3)
- # clojure-europe (19)
- # clojure-gamedev (25)
- # clojure-nl (1)
- # clojure-norway (6)
- # clojure-sweden (4)
- # clojure-uk (2)
- # clojurescript (27)
- # conjure (1)
- # core-async (1)
- # core-typed (7)
- # cursive (5)
- # datomic (35)
- # events (1)
- # fulcro (35)
- # integrant (7)
- # introduce-yourself (2)
- # kaocha (5)
- # leiningen (2)
- # lsp (26)
- # malli (13)
- # nbb (99)
- # off-topic (15)
- # pathom (12)
- # pedestal (5)
- # polylith (8)
- # portal (4)
- # rdf (19)
- # reagent (8)
- # reitit (5)
- # releases (2)
- # remote-jobs (2)
- # rewrite-clj (1)
- # shadow-cljs (94)
- # testing (2)
- # timbre (2)
- # tools-deps (16)
I wonder why is deref
necessary https://github.com/pedestal/pedestal/blob/95e0f1b9f81b2fe1a11b98ab37517296bcc289ca/service/src/io/pedestal/http/ring_middlewares.clj#L201:
(let [options ((deref #'session/session-options) options)]
where session/session-options
is:
(defn- session-options
[options]
{:store (options :store (mem/memory-store))
...
i would have thought that calling the #'session/session-options
var directly does a deref
anyway...i provided the link already, but i guess it's hard to see, that the word "here" is a link, so here it is again: https://github.com/pedestal/pedestal/blob/95e0f1b9f81b2fe1a11b98ab37517296bcc289ca/service/src/io/pedestal/http/ring_middlewares.clj#L201
what is https://github.com/pedestal/pedestal/blob/95e0f1b9f81b2fe1a11b98ab37517296bcc289ca/service/test/io/pedestal/http/ring_middlewares_test.clj#L214 testing:
; delete session
(#(assoc % :response (assoc (:request %) :session nil)))
we shouldn't just have everything from the :request
put into the :response
, no?
i was expecting just a direct clearing of the :session
, eg:
; delete session
(#(assoc-in % [:response :session] nil))