Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
[IMP] website: perf - add cache for website frequent fields
The dispatching layer of Odoo (common to any call) can avoid a query on website
if those 3 values are cached.
Note that for complex business flows, there won't be any gain since website
infos will have to be fetched at some point.
About user_id:
In most cases, for a website page you will need to browse the website btw so
we don't remove this request previously. But in case of a simple image, the
controller /web/content need the public user just to set the request.uid in
auth_public but no other info from website.
With this commit, we don't do the 'select * from website where id in()'
request on each controller declared in auth='public' but use the user_id
from the cache. (Invalidated by the write on website_id)
odoo@6d6b505
Original commit message:
[IMP] website: perf - add cache for website frequent fields
The dispatching layer of Odoo (common to any call) can avoid a query on website if those 3 values are cached. Note that for complex business flows, there won't be any gain since website infos will have to be fetched at some point.
About user_id: In most cases, for a website page you will need to browse the website btw so we don't remove this request previously. But in case of a simple image, the controller /web/content need the public user just to set the request.uid in auth_public but no other info from website.
With this commit, we don't do the 'select * from website where id in()' request on each controller declared in auth='public' but use the user_id from the cache. (Invalidated by the write on website_id)
task-2211013
Co-authored-by: Jérémy Kersten jke@odoo.com Co-authored-by: Romain Derie rde@odoo.com
It will be open in order to use as patch in our patches.txt way since that Odoo refused applied to stable here:
and PR closed doesn't update patch diff even if you push changes to branch.