update README.md

This commit is contained in:
Gered 2021-12-29 17:50:38 -05:00
parent e6ba631f7b
commit 391d79837f

View file

@ -14,11 +14,36 @@ This session store has a sweeper thread that will apply a set of functions
to every session object after every X requests are made. These functions
are also applied to every session when it is read.
## Dependency
## Leiningen
To use aging-session, include the following dependency in your project.clj file.
```clj
[net.gered/aging-session "0.1.0"]
```
[aging-session "0.3.1"]
## This is a fork!
Here is the original [aging-session](https://github.com/kirasystems/aging-session) repository that this is forked from.
This fork is based off of version 0.3.1. Subsequent versions added extra complexity which I do not want in this fork.
### Rationale
The current version of aging-session by Kira Systems became somewhat complicated over the past few years with all these
extra protocols and signed cookie support and more that I don't need or want in this library. I **just** need this
library to help me manage session stores with sessions that are automatically expired and cleaned up in real-time. All
the cookie stuff and all those extras, should I need them, can (and in my very-strongly-held opinion, _should_) be
added on through other means, such as with other libraries providing that extra functionality.
As it stands the version of aging-session that is still maintained by Kira Systems feels a _little_ bit like it is
too heavily influenced by the internal requirements of their own projects.
And that is _**totally**_ fine! :-) But it is not what I needed, thus I started this fork.
### What about alternative libraries?
The only real alternative library that I am aware of is [ring-ttl-session](https://github.com/luminus-framework/ring-ttl-session)
which is built on top of [ExpiringMap](https://github.com/jhalterman/expiringmap). For the most part this works well,
but `ExpiringMap` has a number of issues with thread-safety (a couple of which I have hit recently) that have been
unresolved for a long while now. Which is unfortunate as it's otherwise a great looking library!
## Usage
@ -59,6 +84,10 @@ in sessions older than 1 hour, and delete sessions older than 2 hours.
## License
Copyright © 2012 DiligenceEngine Inc.
Copyright © 2012-2018 Kira Inc.
This library originally developed by Alexander Hudek (https://github.com/akhudek)
Various updates and other changes in this fork by Gered King (https://github.com/gered)
Distributed under the Eclipse Public License, the same as Clojure.