Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
There are three functions in the Yesod typeclass that control how sessions work.
encryptKey returns the encryption key used.
By default, it will take this from a local file, so that sessions can persist between
database shutdowns. This file will be automatically created and filled with random data
if it does not exist. And if you override this function to return Nothing, sessions will be disabled.
Why disable sessions? They do introduce a performance overhead. Under normal circumstances, this overhead is minimal, especially compared to database access. However, when dealing with very basic tasks, the overhead can become noticeable. But be careful about disabling sessions: this will also disable such features as CSRF (Cross-Site Request Forgery) protection.