Community mailing list archives

community@mail.odoo.com

Re: cache gone with sudo()

by
Andre Kurniawan
- 05/18/2016 03:45:28
Hello Holger,

Thank you for your reply. Is there any way to keep the current cache 
while still using `sudo()`?

On 05/18/2016 02:33 PM, Holger Brunn wrote:
> > Why |sudo()| cleared the cache?
>
> caching works per environment, and an environment is defined by the
> cursor, the user and the context. So sudo doesn't actually clear the
> cache, but makes you end up in another cache.
>
> -- Therp - Maatwerk in open ontwikkeling Holger Brunn - Ontwerp en 
> implementatie mail: holger@therp.nl web: http://therp.nl phone: +31 
> (0)20 3093096
>
> _______________________________________________
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:community@mail.odoo.com
> Unsubscribe: https://www.odoo.com/groups?unsubscribe
>

-- 
Regards,
Andre