   "Remove the session from the session store."
   (fn [type session] type))
 
-(defmulti set-session-cookie
-  "Add the session cookie to the given response."
-  (fn [type response session] type))
+(defmulti session-cookie
+  "Return the session data to be stored in the cookie. This is usually the
+  session ID."
+  (fn [type new? session] type))
 
 ;; Default implementations of create-session and set-session-cookie
 


;; Cookie sessions



;; Session middleware

(defn- get-request-session
  "Retrieve the session using the 'session-id' cookie in the request."
  [request]
  (if-let [session-id (-> request :cookies :session-id)]
    (read-session *session-store* session-id)))

(defn- assoc-request-session

(ns compojure.http.session
  (:use compojure.str-utils)
  (:use compojure.http.helpers)
  (:use compojure.http.response)
  (:use compojure.encodings)
  (:use compojure.crypto)
  (:use clojure.contrib.except))

;; Global session store type

