Commit Graph

33 Commits

Author SHA1 Message Date
Michael Snoyman
bcd2b7da84
default-extensions 2021-02-14 09:29:16 +02:00
Michael Snoyman
b861f18008
cabal-version for Hackage 2021-02-14 08:38:54 +02:00
ncaq
ecbedcc5b4 added: version bumps and changelog 2021-02-13 00:12:02 +09:00
ncaq
fc77ca238e updated: lts to 15 2020-04-13 23:46:49 +09:00
Michael Xavier
d847280f31 Cut serversession-backend-redis 1.0.3 2018-01-15 20:23:17 -08:00
Michael Xavier
b262a18ae4 Loosen hedis bounds
This is for #14
2018-01-15 13:46:16 -08:00
Michael Xavier
78fd564eec Update package maintainer
I don't see a way to set multiple maintainers on the project. I don't
have a roadmap or vested interest in all of these packages but for the
time being I'm the active maintainer of these projects.
2017-03-08 09:29:59 -08:00
Michael Xavier
854a5a3d1f serversession-backend-redis 1.0.2 2017-03-03 15:46:14 -08:00
Michael Xavier
f73de7c791 Add blank changelogs for all projects
For future releases we'll update these. I have a few packages that
need releases so that'll be the start.
2017-03-03 15:41:27 -08:00
Michael Xavier
a5114cb505 Rework travis build
Perhaps supporting lts 2-8 is not the best idea.
2017-03-02 14:21:42 -08:00
Michael Xavier
6edd459223 Wall-werror all the things 2017-02-01 18:20:55 -08:00
Michael Xavier
adda409f90 Merge remote-tracking branch 'upstream/master' into redis-session-expiry 2017-01-25 17:46:29 -08:00
Michael Xavier
b51d32df4d widen deps 2016-11-28 09:30:29 -08:00
Kostiantyn Rybnikov
3f5b0da2f1 Re-bump hedis 2016-09-22 14:01:10 +03:00
Kostiantyn Rybnikov
7bce4c18e7 Bump hedis
Useful for https://github.com/fpco/stackage/issues/1247
2016-03-24 17:28:34 +02:00
Michael Xavier
d135958be5 Update comments, exercise expiration codepath
I wanted to at least ensure my change's code was excerised, even though
it makes no material difference to the allStorageTests suite.
2016-03-12 13:11:43 -08:00
Michael Xavier
7d922d1de4 Add first stab at backend auto expiry
This is for issue #7

So it would be nice if we had access to `State` because it would provide
us with `cookieExpires`, but nothing in the machinery of serversession
makes it available to backends for some reason. Also the tests seem to
indicate that the State may not be available at the time of setting up
storange engines (or may be a chicken-and-egg situation). The best
solution seemed to be to take the settings for absolute and idle timeout
that you're going to give to the state and share them.

Just as a reminder for the motivation on this: currently in
serversession's redis backend, you accumulate sessions
indefinitely. Even after they expire, they will stay in redis. The other
backends seem vulnerable to this too but its probably not nearly a big
deal in something like persistent because:

1. Storage is not as much of a premium in peristent's supported backend
compared to redis. They are primarily storing to disk.
2. Persistent's backends have good querying primitives so it is simple
to write jobs to delete old sessions.

Redis must fit all data in memory, so storage is at a premium and in
order to find old keys you'd have to issue the frowned-upon KEYS
command (or SCAN which isn't even suppored by hedis yet) and parse every
session.

This change uses redis' built in expiry mechanism and sets the
expiration every time a write operation is made to a session. Sessions
as they would naturally expire on the client side will now automatically
expire and free memory on the backend.
2016-03-11 16:54:14 -08:00
Felipe Lessa
cc69e23dc9 serversession-backend-redis-1.0.1 2015-12-31 15:45:45 -02:00
Felipe Lessa
01b277b11e New .travis.yml using stack instead of cabal-meta. 2015-12-31 15:25:41 -02:00
Felipe Lessa
774bc18fa1 Force the test suites to use a lot less memory.
Works fine on my machine using GHC 7.10 with these limits.  Note that
I've activated the in-place compaction GC.
2015-05-31 23:22:21 -03:00
Felipe Lessa
0cca9cd086 Use HashMap for SessionMap.
It's a bit faster and uses a bit less memory.
2015-05-31 23:09:02 -03:00
Felipe Lessa
fcdb14e2bf More GHC 7.8 fixes: Functor constraint. 2015-05-31 15:42:10 -03:00
Felipe Lessa
4e3f27cb36 Setup.lhs x 7. 2015-05-31 14:56:39 -03:00
Felipe Lessa
d967f2b4a7 More GHC 7.8 fixes: DeriveDataTypeable, imports, (Functor m). 2015-05-31 14:53:26 -03:00
Felipe Lessa
3e33c58af0
Generalize session data (huge commit). 2015-05-31 11:07:23 -03:00
Felipe Lessa
6895fbee4f Allow Redis to store sessions with more than 512k keys. 2015-05-28 14:34:47 -03:00
Felipe Lessa
ec4623da34 Do not run large data tests in parallel.
Brings peak memory usage of the persistent test suite from 6 GiB to
4 GiB.  Still very bad, though.
2015-05-28 13:02:54 -03:00
Felipe Lessa
c9e080d5b8 Better time format for Redis serialization. 2015-05-28 02:44:46 -03:00
Felipe Lessa
ff6c0efaab Redis backend is all green. 2015-05-28 02:42:22 -03:00
Felipe Lessa
92fbee20da Fix copy-paste. 2015-05-28 02:23:00 -03:00
Felipe Lessa
bdd6db9e2a Do not lose precision when serializing UTCTime to Redis. 2015-05-28 02:20:17 -03:00
Felipe Lessa
7fdfd16216 Add test suite for redis backend.
Currently failing pretty badly. :(
2015-05-28 02:17:36 -03:00
Felipe Lessa
3a56d222a8
First stab at a Redis backend. 2015-05-26 02:23:33 -03:00