Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Technical
  3. Redis Integration (ORM Cache + Session Store) v 19.0
  4. Sales Conditions FAQ

Redis Integration (ORM Cache + Session Store)

by PyBeans https://www.pybeans.com
Odoo

$ 28.57

v 19.0 Third Party
Apps purchases are linked to your Odoo account, please sign in or sign up first.
You bought this module and need support? Click here!
  • Description
  • Manifest
redis odoo cache, odoo redis session, odoo orm cache redis, redis session store odoo, odoo performance redis, odoo multi worker redis, odoo redis integration, shared orm cache odoo, odoo redis cache module, odoo session redis store, redis odoo 19, odoo scalability redis, odoo load balancer redis, redis odoo multi server, odoo worker cache sharing, odoo redis sticky sessions, redis orm invalidation odoo, odoo high performance cache, redis session expiry odoo, odoo redis sentinel, odoo redis tls, odoo redis production, odoo redis configuration, odoo redis url, odoo redis expire, redis cache odoo workers, odoo redis module install, odoo server wide modules redis, odoo redis performance boost, odoo redis memory cache redis odoo caché, odoo redis sesión, caché orm redis odoo, almacén sesión redis odoo, rendimiento odoo redis, odoo múltiples workers redis, integración redis odoo, caché orm compartido odoo, módulo caché redis odoo, almacén sesión redis odoo, redis odoo 19, escalabilidad odoo redis, balanceador carga odoo redis, redis odoo múltiples servidores, compartir caché workers odoo, odoo redis sesiones pegajosas, invalidación orm redis odoo, caché alto rendimiento odoo, expiración sesión redis odoo, odoo redis sentinel, odoo redis tls, odoo redis producción redis odoo cache, odoo redis session, cache orm redis odoo, stockage session redis odoo, performance odoo redis, odoo multi worker redis, intégration redis odoo, cache orm partagé odoo, module cache redis odoo, stockage session redis odoo, redis odoo 19, scalabilité odoo redis, équilibreur charge odoo redis, redis odoo multi serveurs, partage cache workers odoo, odoo redis sessions persistantes, invalidation orm redis odoo, cache haute performance odoo, expiration session redis odoo, odoo redis sentinel, odoo redis tls, odoo redis production redis odoo cache, odoo redis sitzung, orm cache redis odoo, sitzungsspeicher redis odoo, leistung odoo redis, odoo mehrere worker redis, redis odoo integration, geteilter orm cache odoo, cache modul redis odoo, sitzungsspeicher redis odoo, redis odoo 19, skalierbarkeit odoo redis, lastausgleich odoo redis, redis odoo mehrere server, cache sharing worker odoo, odoo redis persistente sitzungen, orm invalidierung redis odoo, hochleistungs cache odoo, sitzungsablauf redis odoo, odoo redis sentinel, odoo redis tls, odoo redis produktion redis odoo cache, odoo redis sessão, cache orm redis odoo, armazenamento sessão redis odoo, desempenho odoo redis, odoo múltiplos workers redis, integração redis odoo, cache orm compartilhado odoo, módulo cache redis odoo, armazenamento sessão redis odoo, redis odoo 19, escalabilidade odoo redis, balanceador carga odoo redis, redis odoo múltiplos servidores, compartilhamento cache workers odoo, odoo redis sessões persistentes, invalidação orm redis odoo, cache alto desempenho odoo, expiração sessão redis odoo, odoo redis sentinel, odoo redis tls, odoo redis produção

Redis Integration

Shared Redis ORM cache and session store for Odoo 19. Eliminates per-worker cache duplication, enables true multi-server deployments without sticky sessions, and makes cache invalidation a single atomic operation - all with graceful fallback if Redis is unavailable.

Why You Need This

  Without Redis

  • Each Odoo worker builds its own ORM cache independently - 8 workers = 8× the PostgreSQL queries
  • Workers never share cache invalidations - stale data lingers per-process
  • Sessions stored as files on disk - breaks load-balanced multi-server setups
  • Every restart forces all workers to warm caches from scratch
  • Disk I/O on every session read/write slows down each HTTP request

  With Redis

  • All workers share one cache - Worker 2 gets what Worker 1 already fetched in microseconds
  • Cache invalidation is instant across all processes - one INCR command, O(1)
  • Sessions in Redis - any server handles any request, no sticky sessions needed
  • Warm cache survives worker restarts via Redis persistence
  • Sliding TTL keeps active users logged in; anonymous sessions auto-expire in 3 h

Key Features

Shared ORM Cache

Replaces per-worker in-memory LRU caches with a single Redis-backed cache shared by all workers and servers. Fewer PostgreSQL round-trips, faster responses.

Generation-Counter Invalidation

Cache clear is a single atomic INCR - no SCAN, no DEL storm, no race conditions. Old keys become invisible instantly and expire on their own TTL.

Redis Session Store

Sessions live in Redis, not the filesystem. Any server handles any request - no sticky sessions required, ideal for load-balanced and cloud deployments.

Dual TTL Sessions

Authenticated users stay logged in for 7 days (sliding). Anonymous visitors expire after 3 hours. Both configurable. Redis cleans up automatically - no GC jobs.

Redis Sentinel Support

Production HA via Redis Sentinel. If the primary Redis fails, Sentinel automatically promotes a replica. Configure via environment variables.

Graceful Fallback

If Redis is unreachable at startup, Odoo continues with its default in-memory LRU cache and filesystem sessions. Nothing crashes. Errors are logged clearly.

TLS Support

Use rediss:// URLs for encrypted connections. Works with Upstash, Redis Cloud, and your own TLS-enabled Redis instance.

JSON Session Encoding

Session data is stored as JSON (not pickle) - human-readable in redis-cli, safe from arbitrary code execution, with full datetime/set type support.

Multi-DB Aware

Each database gets its own Redis key namespace. Running 10 databases on one Odoo instance? Each gets an isolated ORM cache with no key collisions.

How It Works

  ORM Cache Sub-System

How Odoo normally works: Each worker process holds its own in-memory LRU dict. Worker 1 fetches res.users field definitions from PostgreSQL and stores them locally. Worker 2 does the same - it doesn't know Worker 1 already did it.

With this module: The module monkey-patches Registry.init at server startup. After Odoo builds its internal __caches dict, we swap each LRU instance with a RedisLRU - a drop-in dict-compatible class that stores every entry in Redis. Worker 2 gets the same data Worker 1 stored, instantly, from RAM.
  Generation-counter trick: Instead of scanning and deleting thousands of keys on cache.clear(), we INCR a counter. All old keys become unreachable and expire on their own TTL. One atomic Redis command replaces what would be a slow SCAN + DEL loop.

  Session Store Sub-System

How Odoo normally works: Sessions are files on disk at ~/.local/share/Odoo/sessions/. If your load balancer routes a request to Server 2 but the session was created on Server 1, the file is missing - the user gets logged out.

With this module: We replace http.Application.session_store (a cached_property) with a RedisSessionStore before the first HTTP request arrives. Every server reads and writes sessions to the same Redis. Any server handles any request. No sticky sessions. No logout surprises.
  Sliding TTL: Every get() call refreshes the session TTL. Active users are never logged out mid-session. The TTL countdown only starts when the user truly stops using Odoo.

  Key Namespace Layout

ORM Cache (Redis DB 0)
  {db_name}_{bucket}_generation    invalidation counter (no expiry)
  {db_name}_{bucket}_{gen}_{key}    cached value (TTL: 7 days)

Session Store (Redis DB 1)
  session:{prefix}:{sid}              JSON session (TTL: 7 days auth / 3 h anon)

Configuration

  odoo.conf

[options]
server_wide_modules = base,web,odoo_redis

; ORM Cache (Redis DB 0)
ormcache_redis_url = redis://localhost:6379/0
ormcache_redis_expire = 604800

; Session Store (Redis DB 1)
session_redis_url = redis://localhost:6379/1
session_redis_expire = 604800
session_redis_expire_anonymous = 10800
session_redis_prefix = prod

  Using two Redis logical databases (0 and 1) lets you flush the ORM cache independently from sessions: redis-cli -n 0 FLUSHDB

  Environment Variables

# Enable Redis session store
ODOO_SESSION_REDIS=true
ODOO_SESSION_REDIS_URL=redis://localhost:6379/1
ODOO_SESSION_REDIS_PREFIX=prod
ODOO_SESSION_REDIS_EXPIRATION=604800
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS=10800

# Redis Sentinel (HA)
ODOO_SESSION_REDIS_SENTINEL_HOST=sentinel-host
ODOO_SESSION_REDIS_SENTINEL_PORT=26379
ODOO_SESSION_REDIS_SENTINEL_MASTER_NAME=mymaster

  Environment variables take precedence over odoo.conf for session store settings.

  Critical: Must Be in server_wide_modules

This module must be listed in server_wide_modules, not just installed in the database. The session store patch must be in place before the first HTTP request arrives - before any database is even selected. Installing it as a regular app is too late; the default filesystem store is already cached.

Odoo.sh Deployment

Odoo.sh doesn't allow sidecar services, so you need an external Redis. The following providers all work out of the box with TLS URLs.

Upstash

Serverless Redis. Free tier (10k commands/day, 256 MB). Recommended for Odoo.sh.

rediss://default:{pass}@{host}:{port}/0
Redis Cloud

Managed Redis by Redis Labs. Free tier 30 MB. Supports TLS and Sentinel.

rediss://:{pass}@{host}:{port}/0
Your Own VPS

Full control. Install Redis on your VPS, firewall port 6379, enable TLS.

rediss://:{pass}@your-vps-ip:6380/0
  Odoo.sh odoo.conf example
[options]
server_wide_modules = base,web,odoo_redis

ormcache_redis_url    = rediss://:your_password@your-redis-host:6380/0
ormcache_redis_expire = 604800

session_redis_url                = rediss://:your_password@your-redis-host:6380/1
session_redis_expire             = 604800
session_redis_expire_anonymous   = 10800
session_redis_prefix             = prod

Installation

1 Install Python dependency
pip install redis
2 Place module in your addons path
cp -r odoo_redis /path/to/your/addons/
3 Update odoo.conf

Add odoo_redis to server_wide_modules and set your Redis URLs (see Configuration section above).

4 Install the module in Odoo

Go to Apps Update App List Search "Redis Integration" Install.

5 Verify in logs
odoo_redis: Registry.init patched for shared Redis ORM cache
odoo_redis: Redis ORM cache active for db='mydb', buckets=[default, assets, ...], TTL=604800s
odoo_redis: Redis session store active - prefix='prod', ttl_auth=604800s, ttl_anon=10800s

Custom Development & Version Support

  Need This Module for a Different Odoo Version?

We can adapt this module for any Odoo version you need.

  Want Custom Features or Modifications?

We provide custom development services to enhance or modify this module to your specific business requirements.

  What We Can Do
  • Port to any Odoo version
  • Redis Cluster support
  • Custom cache bucket configuration
  • Redis Pub/Sub for cross-process events
  • Dashboard to monitor Redis key counts and TTLs
  • Integration with your existing Redis infrastructure
  Quick Turnaround
  • Fast development cycles
  • Regular progress updates
  • Quality assurance testing
  • Documentation included
  • Training and support
  • Competitive pricing
  Request Custom Development
  Email Us Directly

devpybeans@gmail.com

Support & Warranty


90 Days FREE Support Included!

We provide 90 days of completely FREE support after module installation.

Bug Fixes

Free bug fixes and issue resolution for 90 days

Technical Support

Installation help and configuration assistance

Usage Guidance

Best practices and usage recommendations

Support Period: Starts from the date of module installation
Response Time: Within 24-48 hours on business days
Support Channels: Email, Contact Form, and Direct Communication

Contact Information

Ready to scale your Odoo deployment with Redis? Get in touch!

Email Support

devpybeans@gmail.com

Send Email

Website Contact

www.pybeans.com

Contact Form
PyBeans Logo

Developed by PyBeans - Enhancing Odoo for better business solutions.

Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 530
Technical Name odoo_redis
LicenseLGPL-3
Websitehttps://www.pybeans.com

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with