Skip to Content
Menu

ORM Cache Redis

by
Odoo

30.46

v 16.0 Third Party
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 250
Technical Name ormcache_redis_gt
LicenseOPL-1
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 250
Technical Name ormcache_redis_gt
LicenseOPL-1

ORM Cache Redis

Next-Gen Odoo Performance with Redis - Advanced Cache Solution for Enterprise

Performance Boost: Up to 80% faster ORM operations

Persistent Redis cache | Advanced serialization | Configurable expiration | Zero cold-start

Problems WITHOUT this module

Standard ORM Cache Issues:

  • Worker Isolation: Each worker rebuilds same cache independently
  • Memory Multiplication: Same data cached N times for N workers
  • Cold Restart: All cache lost on server restart
  • Database Hammering: Repeated queries from different workers
  • No Persistence: Cache never survives across restarts
Performance Impact:
  • Database CPU: 250%
  • Response Time: 180%
  • Memory Waste: 400%
  • Cache Miss Rate: 60%

Benefits WITH Redis Cache

Performance Gains:
  • ORM Speed: 80%
  • Database Load: 70%
  • Memory Efficiency: 75%
  • Cache Hit Rate: 90%

Redis Advantages:

  • Persistent Cache: Survives server restarts and deployments
  • Smart Serialization: Type-aware with b:/s:/j: prefixes
  • Configurable TTL: Flexible expiration policies
  • Enterprise Features: Clustering, replication, monitoring
  • Robust Fallback: Graceful degradation on Redis failure

Redis Cache vs Standard Odoo Cache

Feature Redis Cache Standard Odoo Cache
Data Persistence Survives restarts Lost on restart
Architecture Hybrid: Local LRU + Redis Local LRU only
Cross-Worker Sharing Via Redis backend Isolated per worker
Monitoring & Debug Redis CLI, stats, tools No external tools
Memory Efficiency Single shared instance Duplicated per worker
Performance Gain 80% faster ORM Baseline

Advanced Architecture

Hybrid Cache Architecture

L1 (Local LRU): Ultra-fast in-memory cache per worker
L2 (Redis): Shared persistent cache across workers
Read Flow: L1 L2 Database (with L1 backfill)
Write Flow: Save to both L1 and L2 simultaneously
Best Performance: Local speed + shared persistence

Installation & Configuration

Step 1: Install Redis Server

# Install Redis server
sudo apt-get install redis-server

# Install Python client
pip3 install redis

Step 2: Configure Redis

# Start Redis service
sudo systemctl start redis-server
sudo systemctl enable redis-server

# Test connection
redis-cli ping

Step 3: Odoo Configuration

# Add to odoo.conf
[options]
server_wide_modules = base,web,ormcache_redis_gt
redis_cache_uri = redis://localhost:6379/0
# For Redis Cluster:
# redis_cache_uri = redis://redis-cluster:6379
redis_cache_prefix = odoo:cache:
redis_cache_expiration = 3600
# redis_cache_clear_on_startup = False # Keep cache persistent
Important: Must add to server_wide_modules for Registry override!

Step 4: Install Module

# Install module via Apps menu
# Search: "ORM Cache Redis"

# Then restart Odoo to load new config
sudo systemctl restart odoo

Advanced Configuration Options

Connection Settings:

# Basic Redis
redis_cache_uri = redis://localhost:6379/0

# With password
redis_cache_uri = redis://:password@host:6379/0

# Redis Sentinel
redis_cache_uri = redis+sentinel://sentinel:26379/mymaster

Cache Policies:

# Standard TTL (1 hour)
redis_cache_expiration = 3600

# Long-lived (24 hours)
redis_cache_expiration = 86400

# No expiration
redis_cache_expiration = 0

# Force cache clear on startup
redis_cache_clear_on_startup = True

Key Management:

# Environment separation
redis_cache_prefix = prod:cache:

# Multi-tenant
redis_cache_prefix = tenant1:cache:

# Version-specific
redis_cache_prefix = v16:cache:

Monitoring & Troubleshooting

How to Monitor Redis Cache Performance

Redis Connection
redis-cli ping
redis-cli info stats
redis-cli monitor
Cache Statistics
redis-cli info memory
redis-cli dbsize
redis-cli keys "odoo:cache:*"
Odoo Logs
"Storing ORM cache with Redis"
"Redis cache keys"
"Failed to connect to Redis"
Pro Monitoring Tips:
  • Use redis-cli --latency to check network latency
  • Monitor memory usage with redis-cli info memory
  • Set up alerts for Redis availability and memory usage
  • Use Redis GUI tools like RedisInsight for visual monitoring

Technical Implementation

Core Components:

  • RedisLRU: Hybrid cache implementation
  • Registry Override: Hook into ORM cache system
  • Smart Serializer: Type-aware with prefixes
  • Connection Manager: Robust Redis client

Serialization Strategy:

  • b: prefix: Raw bytes storage
  • s: prefix: UTF-8 string storage
  • j: prefix: JSON complex objects
  • Error Handling: Graceful fallback on decode failure

Enterprise Features:

  • Persistence: Data survives restarts
  • Configurable TTL: Flexible expiration
  • Key Prefixing: Multi-tenant support
  • Connection Pooling: High concurrency ready

Conclusion

Redis Cache - The Ultimate Performance Upgrade!

Performance:
80% faster ORM
Persistence:
Survives restarts
Enterprise:
Production ready
Configurable:
Flexible setup

Price: $29.9 USD - Best-in-class cache solution with enterprise features!

Choose Redis for maximum performance, persistence, and enterprise scalability

Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

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.
There are no ratings yet!
asking about ver
by
alktab23
on 7/8/25, 3:52 AM

hi 

Does this addon work on Odoo Community?

Re: asking about ver
by
Giang Phạm
on 7/8/25, 4:55 AM Author

Hi,

Yes it works with both community and enterprise versions.