OdooWiki OCA HUB

Endpoint cache pre-heat

endpoint_cache_preheat folder_open OCA/web-api open_in_new
Uncategorised License: LGPL-3

Delay cache pre-heat for expensive endpoints.

If an endpoint takes to long to get cached, it will probably make your call fail or any cron job that calls it.

This module allows pre-heat the cache and delay its generation.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets you schedule automatic cache pre-heating for API endpoints so slow endpoints are refreshed in the background instead of during a live call. A daily scheduled job rebuilds the cache for endpoints you flag, and a button lets you force it on demand.

This module adds background cache pre-heating to endpoints that use the endpoint cache system. On an endpoint form you get two new fields: "Automatic cache pre-heat" (a checkbox) and "Last pre-heat on" (a read-only date/time). When the checkbox is ticked, the endpoint becomes eligible for automatic pre-heating.

A scheduled job named "Endpoint cache pre-heat" runs once a day. It looks at endpoints that have a cache policy and the pre-heat checkbox enabled, and selects those whose last pre-heat is older than the policy period (day, week or month) or that have never been pre-heated. For each one it creates a background job that rebuilds the cache and then records the current date/time in "Last pre-heat on".

The existing "Force cache pre-heat" button is replaced by "Force cache pre-heat (async)". Clicking it purges the endpoint's cached attachments and queues a background job to rebuild the cache, then closes the dialog. You can follow the job status in the Jobs menu.

If the cache is wiped for an endpoint, the "Last pre-heat on" value is reset so it can be pre-heated again. The module works on the endpoint.mixin model and the endpoint form view, and relies on the queue job system for background execution.

Models and fields (1)
  • endpoint.mixin · extends an existing modelcache_preheat (Automatic cache pre-heat), cache_preheat_ts (Last pre-heat on)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 2 confirmed, 7 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 18.0

Go to an endpoint form and tick Automatic cache pre-heat option.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.