Search code examples
sessioncookiesclojurering

Why ever use in-memory session stores instead of encrypted-cookie session stores


I'm reading:

https://github.com/mmcgrana/ring/wiki/Sessions

So now I'm wondering: why would I ever want to use an in-memory session store instead of a encrypted-cookie session store?

it seems like the latter (1) does not waste server memory and (2) can persist longer then the in-memory stores.

Thus, my question: why/when would I ever want to use in-memory stores?

Thanks!


Solution

    • Cookies cannot store much data.

    • Even if they could (local storage can), the data is not available to the server (unless you send it with every request, which could be expensive if the data is big).