If you've spent any time running a retail counter during rush hours, you already know speed isn't just nice to have—it's everything. I've watched cashiers get visibly frustrated when their system lags between scanning items and showing prices. Customers shift their weight, check their phones, and you can feel the tension building. That's where Odoo 19's caching comes in handy. Instead of your POS hammering the database for every little thing, it keeps the stuff you use most in memory. The difference is pretty dramatic.
Why Caching Makes a Difference
Speed Where It Counts
Here's what happens without caching: scan item, wait, apply discount, wait, process payment, wait. Each pause is your system asking the database for information. With caching, that same data is already sitting in memory ready to go. I've seen checkout times drop noticeably just from proper cache usage, especially during peak hours when you've got multiple registers running.
Your Database Will Thank You
Three or four POS terminals hitting your database with the same product queries over and over? That's brutal. Caching stops the redundancy—each terminal pulls from memory instead of creating database traffic. Your server stays responsive even when business is good and all your cashiers are busy.
The Customer Experience Factor
Nobody wants to be stuck in a slow line. We've all been there, watching the person at the register tap their screen repeatedly while nothing happens. When your POS responds instantly, customers barely notice the technology. They just know checkout was quick and painless. That matters more than you'd think when they're deciding whether to come back or try somewhere else.
Making the Most of Your Hardware
Your CFO will appreciate this: better caching means you get more out of what you've already bought. Instead of upgrading to a more expensive server because things feel sluggish, you're using your current RAM more intelligently. Same hardware, better performance.
Getting Practical: How to Actually Use the Cache
Odoo 19 gives you several approaches for working with cached data in your POS module. Let's break down the practical ones.
Storing Stuff for the Current Order
Say you need to attach temporary notes to an order—table numbers for restaurants or special instructions for prep. The pos object makes this simple enough.
Here's how you add data to an order:
import { usePos } from "@point_of_sale/app/hooks/pos_hook";
this.pos = usePos();
this.pos.getOrder().specialRequest = 'Extra napkins needed';And here's how you read it back:
let request = this.pos.getOrder().specialRequest;
console.log(request);
One thing that tripped me up initially: Odoo 19 switched to camelCase naming, so it's getOrder() now instead of the old get_order() from previous versions.
Keeping Track of Cashier Preferences
What if you want to remember settings for whoever's logged in? Like discount permissions or their preferred screen layout. Same concept, different object.
Setting preferences:
this.pos.getCashier().settings = { canApplyDiscounts: true };Reading them back:
let cashierSettings = this.pos.getCashier().settings;
console.log(cashierSettings.canApplyDiscounts);
When You Need More Structure: The Cache Utility
For anything beyond basic key-value storage, Odoo 19 includes a proper Cache utility that handles things more cleanly.
First, set it up:
import { Cache } from "@web/core/utils/cache";
setup() {
super.setup();
this.pos.cache = new Cache((key) => null);
}Storing data looks like this:
setCacheValue(key, value) {
this.pos.cache.clear(key);
this.pos.cache.read(key);
const { cache } = this.pos.cache._getCacheAndKey(key);
cache[key] = value;
}
this.setCacheValue('rewardPoints', 750);Retrieving is straightforward:
getCacheValue(key) {
return this.pos.cache.read(key);
}
let points = this.getCacheValue('rewardPoints');
console.log(points);Cleaning Up Cached Data
The cache automatically clears when you close your POS session, but sometimes you want control over when things get wiped:
this.pos.cache.invalidate();
this.pos.cache.clear('rewardPoints')
Putting It All Together
These caching tools aren't just technical features buried in Odoo's documentation—they actually affect how your daily operations feel. Whether you're tracking customer preferences, managing who can apply discounts, or building custom workflows, proper caching delivers the kind of responsiveness that keeps retail moving.
What I like about this approach? You get measurably faster performance without buying new hardware or making your setup more complicated. Just smarter use of the RAM you already have to keep transactions flowing.
Want to see how this changed from the previous version? Check out our earlier post on How to Store Values in POS Cache in Odoo 18.