Skip to main content

Module to store session on a redis

Project description

Odoo Session inside Redis

Use redis to store odoo cookie session.

Inspired by :

https://github.com/odoo/odoo-extra/commit/99265410bf396fc476c0a4502a44549a1dd29ef2

This gist https://gist.github.com/carlopires/1451947

This module https://github.com/Smile-SA/odoo_addons/commit/d90e23f6fbc078beb0cb14080a2b18de332200ef

And this module https://github.com/camptocamp/odoo-cloud-platform/tree/16.0/session_redis

Install

pip install mangono-odoo-redis-session

Config

Configuration is done through environment variables. Alternatively, you can use a config parameter under [redis_sessions_store]. Environment variable have higher priority than config parameter.

ENV_VARIABLE_NAME = default | config_parameter

Redis connection

REDIS_HOST = None | host – Redis host.

REDIS_PORT = None | port – Redis host port.

REDIS_PREFIX = None | prefix – Prefix for Redis keys.

REDIS_URL = None | url – Alternative connection through url.

REDIS_PASSWORD = None | password – Redis password.

Session TTL parameters

ODOO_SESSION_REDIS_EXPIRATION = 259200 | expiration – Logged session TTL in seconds.

ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS = 120 | anon_expiration – Anonymous session TTL in seconds.

ODOO_SESSION_REDIS_TIMEOUT_ON_INACTIVITY = "True" | timeout_on_inactivity"true" | "1" | "t" will evaluate to True (case-insensitive), all other values will evaluate to False – Whether user activity should reset session TTL or not. If false, session will have a fixed expiration set on creation.

ODOO_SESSION_REDIS_TIMEOUT_IGNORED_URLS = "/longpolling,/calendar/notify" | ignored_urls – Comma separated list of string matching starts of endpoints that won't update session TTL on access. Has no effect when in fixed TTL mode. Note that the default value is not overridable and will always be added.

Known issues

On fixed expiry time , refreshing the page still refresh TTL.

See doc in https://atlas.docs.mangono.io/redis-session

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mangono_odoo_redis_session-1.3.0.tar.gz (95.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mangono_odoo_redis_session-1.3.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file mangono_odoo_redis_session-1.3.0.tar.gz.

File metadata

File hashes

Hashes for mangono_odoo_redis_session-1.3.0.tar.gz
Algorithm Hash digest
SHA256 026832dd45c07b0020f2be40ed1aafde15b2260f101bd0f2c62f023aa1eb24d7
MD5 25e59571c4263a603d2a711ec290a4ec
BLAKE2b-256 b228981b7ca4cd6374b2317bccb254ac40d5ef93f20928464d245868ddc3bf93

See more details on using hashes here.

File details

Details for the file mangono_odoo_redis_session-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mangono_odoo_redis_session-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 306888514e10c89b4ed63b4a45882d3b8a24724d9d7b1e251dd923fbfdb459c4
MD5 d6fe65c3231d338ea78044aae81b7bce
BLAKE2b-256 b563bdb8ba3e36be6085055504c1fc80b7b13c1535a3ef90895b9697a2af831e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page