{"action":"opened","issue":{"url":"https://api.github.com/repos/nginx-clojure/nginx-clojure/issues/98","labels_url":"https://api.github.com/repos/nginx-clojure/nginx-clojure/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/nginx-clojure/nginx-clojure/issues/98/comments","events_url":"https://api.github.com/repos/nginx-clojure/nginx-clojure/issues/98/events","html_url":"https://github.com/nginx-clojure/nginx-clojure/issues/98","id":110013664,"number":98,"title":"Ring session store which is based on shared map","user":{"login":"xfeep","id":6120241,"avatar_url":"https://avatars.githubusercontent.com/u/6120241?v=3","gravatar_id":"","url":"https://api.github.com/users/xfeep","html_url":"https://github.com/xfeep","followers_url":"https://api.github.com/users/xfeep/followers","following_url":"https://api.github.com/users/xfeep/following{/other_user}","gists_url":"https://api.github.com/users/xfeep/gists{/gist_id}","starred_url":"https://api.github.com/users/xfeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfeep/subscriptions","organizations_url":"https://api.github.com/users/xfeep/orgs","repos_url":"https://api.github.com/users/xfeep/repos","events_url":"https://api.github.com/users/xfeep/events{/privacy}","received_events_url":"https://api.github.com/users/xfeep/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nginx-clojure/nginx-clojure/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/nginx-clojure/nginx-clojure/milestones/13","html_url":"https://github.com/nginx-clojure/nginx-clojure/milestones/0.4.3","labels_url":"https://api.github.com/repos/nginx-clojure/nginx-clojure/milestones/13/labels","id":1299325,"number":13,"title":"0.4.3","description":"","creator":{"login":"xfeep","id":6120241,"avatar_url":"https://avatars.githubusercontent.com/u/6120241?v=3","gravatar_id":"","url":"https://api.github.com/users/xfeep","html_url":"https://github.com/xfeep","followers_url":"https://api.github.com/users/xfeep/followers","following_url":"https://api.github.com/users/xfeep/following{/other_user}","gists_url":"https://api.github.com/users/xfeep/gists{/gist_id}","starred_url":"https://api.github.com/users/xfeep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfeep/subscriptions","organizations_url":"https://api.github.com/users/xfeep/orgs","repos_url":"https://api.github.com/users/xfeep/repos","events_url":"https://api.github.com/users/xfeep/events{/privacy}","received_events_url":"https://api.github.com/users/xfeep/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":0,"state":"open","created_at":"2015-09-10T12:54:57Z","updated_at":"2015-10-06T13:59:11Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-10-06T13:59:11Z","updated_at":"2015-10-06T13:59:11Z","closed_at":null,"body":"When `worker_processes`  > 1 in nginx.conf, we can not use the default in-memory session store\r\nbecause there're more than one JVM instances and requests from the same session perphaps\r\nwill be handled by different JVM instances.  Alough cookie store is no prolem for this case, \r\nif we provide shared map based session store there will be more chioces. e.g.\r\n\r\n```clojure\r\n(def my-session-store\r\n  ;; use cookie store \r\n  ;(ring.middleware.session.cookie/cookie-store {:key \"a 16-byte secret\"})\r\n  \r\n  ;; use nginx shared map store\r\n  (nginx.clojure.session/shared-map-store \"mySessionStore\"))\r\n\r\n```\r\n\r\nin nginx.conf\r\n\r\n```nginx\r\nshared_map mySessionStore tinymap?space=1m&entries=256;\r\n```"}}