kemal-session-rethinkdb
Version, currently 0.1.13 versions
- 0.1.3latestFeb 26, 2022
- 0.1.2not indexedFeb 26, 2022
- 0.1.1not indexedFeb 26, 2022
github.com/kingsleyh/kemal-session-rethinkdb
RethinkDB store for kemal-session
Nothing has been indexed for 0.1.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
kemal-session-rethinkdb:
github: kingsleyh/kemal-session-rethinkdb
version: ~> 0.1.1Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.1. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
kemal-session-rethinkdb
This is a RethinkDB adaptor for Kemal Session
Installation
Add this to your application's shard.yml:
dependencies:
kemal-session-rethinkdb:
github: kingsleyh/kemal-session-rethinkdb
rethinkdb:
github: kingsleyh/crystal-rethinkdb
Usage
require "kemal"
require "kemal-session-rethinkdb"
require "rethinkdb"
include RethinkDB::Shortcuts
# connect to RethinkDB
connection = r.connect(host: "localhost")
Session.config do |config|
config.cookie_name = "rethinkdb_test"
config.secret = "a_secret"
config.engine = Session::RethinkDBEngine.new(connection)
config.timeout = 1.week
end
get "/" do
puts "Hello World"
end
post "/sign_in" do |context|
context.session.int("see-it-works", 1)
end
Kemal.run
If you are already using crystal-rethinkdb you can re-use the reference to your connection.
Optional Parameters
Session.config do |config|
config.cookie_name = "rethinkdb_test"
config.secret = "a_secret"
config.engine = Session::RethinkDBEngine.new(
connection: connection,
sessiontable: "sessions",
cachetime: 5
)
config.timeout = Time::Span.new(1, 0, 0)
end
| Param | Description |
|---|---|
| connection | A Crystal Mysql DB Connection |
| sessiontable | Name of the table to use for sessions - defaults to "sessions" |
| cachetime | Number of seconds to hold the session data in memory, before re-reading from the database. This is set to 5 seconds by default, set to 0 to hit the db for every request. |
Bugs
Please raise any bugs as issues on github: Issues
Contributing
- Fork it (https://github.com/kingsleyh/kemal-session-rethinkdb/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- kingsleyh Kingsley Hendrickse - creator, maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- Feb 26, 2022
- Commit
fd5b8daf6ad0- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/kingsleyh/kemal-session-rethinkdb
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 3