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.4.1.tar.gz (95.0 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.4.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for mangono_odoo_redis_session-1.4.1.tar.gz
Algorithm Hash digest
SHA256 b7258342bdc97919482e57f06e1f077de091db6b7d7f181486ee35c4f0788bcc
MD5 586fc243b35f21c35c8a4a36a09742da
BLAKE2b-256 ea30953f36a221d4f6ef5e14b7b2a4e4c0b7839cc6b861fe66cde7af0669a6ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mangono_odoo_redis_session-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 edb7cae48a31322112c3d6ee655705fc43fce2cd779b89ff9252f67b1a32e3fc
MD5 9149ac9aa1d4f4b6e9d6826ed0b38799
BLAKE2b-256 03e4e0b491225e3c77043e6ba46bc79aeb0b08344634872eb8a36efdd237f39e

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