The in-memory cache – ormcache
How to do it...
The classes of this ORM cache are available at
/odoo/tools/cache.py. In order to use these in any file, you will need to import them as follows:
from odoo import tools
After importing the classes, you can use the ORM cache decorators. Odoo provides different types of in-memory cache decorator. We'll take a look at each of these in the following sections.
@tools.ormcache('mode') def fetch_mode_data(self, mode): # some calculations return result
When you call this method for the...