{"id":22430532,"url":"https://github.com/martenframework/marten-redis-session","last_synced_at":"2025-08-01T11:32:21.731Z","repository":{"id":182433932,"uuid":"649404371","full_name":"martenframework/marten-redis-session","owner":"martenframework","description":"A Redis session store for the Marten web framework. ","archived":false,"fork":false,"pushed_at":"2024-08-08T00:14:21.000Z","size":39,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-08T02:40:20.090Z","etag":null,"topics":["crystal","framework","marten","redis","session","web"],"latest_commit_sha":null,"homepage":"","language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/martenframework.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-04T18:29:26.000Z","updated_at":"2024-08-08T00:14:24.000Z","dependencies_parsed_at":"2024-03-12T15:44:35.377Z","dependency_job_id":"bf1d857b-41c3-47db-81be-65e94ad6d7b1","html_url":"https://github.com/martenframework/marten-redis-session","commit_stats":null,"previous_names":["martenframework/marten-redis-session"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten-redis-session","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten-redis-session/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten-redis-session/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martenframework%2Fmarten-redis-session/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martenframework","download_url":"https://codeload.github.com/martenframework/marten-redis-session/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228371009,"owners_count":17909389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crystal","framework","marten","redis","session","web"],"created_at":"2024-12-05T21:08:46.629Z","updated_at":"2024-12-05T21:08:47.261Z","avatar_url":"https://github.com/martenframework.png","language":"Crystal","funding_links":[],"categories":["Marten shards"],"sub_categories":["Sessions"],"readme":"# Marten Redis Session\n\n[![CI](https://github.com/martenframework/marten-redis-session/workflows/Specs/badge.svg)](https://github.com/martenframework/marten-redis-session/actions)\n[![CI](https://github.com/martenframework/marten-redis-session/workflows/QA/badge.svg)](https://github.com/martenframework/marten-redis-session/actions)\n\n**Marten Redis Session** provides a [Redis](https://redis.io) [session store](https://martenframework.com/docs/handlers-and-http/sessions#session-stores) for the Marten web framework.\n\n## Installation\n\nSimply add the following entry to your project's `shard.yml`:\n\n```yaml\ndependencies:\n  marten_redis_session:\n    github: martenframework/marten-redis-session\n```\n\nAnd run `shards install` afterward.\n\n## Configuration\n\nFirst, add the following requirement to your project's `src/project.cr` file:\n\n```crystal\nrequire \"marten_redis_session\"\n```\n\nThen you can configure your project to use the Redis session store by ensuring that the [`sessions.store`](https://martenframework.com/docs/development/reference/settings#store) setting is set to `:redis`:\n\n```crystal\nMarten.configure do |config|\n  config.sessions.store = :redis\nend\n```\n\n_Congrats! You’re in!_ From now on, your session data will be persisted in Redis.\n\nIt should be noted that by default the Redis session store will attempt to connect to Redis on `localhost` and port `6379`. This can be changed by setting a different URI through the use of the `redis_session.uri` setting:\n\n```crystal\nMarten.configure do |config|\n  config.redis_session.uri = \"redis:///\"\nend\n```\n\nIt is also worth mentioning that you can leverage the `redis_session.namespace` setting to configure a \"namespace\" for the Redis keys that will be used to persist session data. This can be useful if your Redis instance is shared for various purposes and you need to prevent conflicts between session data keys and other Redis keys. For example:\n\n```crystal\nMarten.configure do |config|\n  config.redis_session.namespace = \"sessions\"\nend\n```\n\n## Authors\n\nMorgan Aubert ([@ellmetha](https://github.com/ellmetha)) and \n[contributors](https://github.com/martenframework/marten-redis-session/contributors).\n\n## License\n\nMIT. See ``LICENSE`` for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenframework%2Fmarten-redis-session","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartenframework%2Fmarten-redis-session","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartenframework%2Fmarten-redis-session/lists"}