There's more...

The ORM cache is the Least-Recently Used (LRU) cache, meaning that if a key in the cache is not used frequently, it will be removed. If you don't use the ORM cache properly, it might do more harm than good. If you want to learn how your cache is performing, you can pass the SIGUSR1 signal to the Odoo process:

kill -SIGUSR1 2697

Here, 2697 is the process ID. After executing the command, you will explore the status of the ORM cache in the logs:

> 2019-02-16 12:01:20,493 2697 INFO test-12 odoo.tools.cache: 1 entries, 39 hit, 5 miss, 0 err, 88.6% ratio, for res.users._compute_session_token 
> 2019-02-16 12:01:20,493 2697 INFO test-12 odoo.tools.cache: 7 entries, 64 hit, 24 miss, 0 err, 72.7% ratio, for res.users._has_group
> 2019-02-16 12:01:20,493 2697 INFO test-12 odoo.tools.cache: 1 entries, 3 hit, 2 miss, 0 err, 60.0% ratio, for res.users.context_get

If the cache's hit-and-miss ratio is too low, you should remove the ORM cache from the method.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset