Our services support both HTTP/1.1 and HTTP/2 over HTTPS.
Any REST APIs built on HTTP/1.1 will continue to work transparently as before,
with no changes to be made to applications.
HTTP/2 is designed to use fewer connections so servers and networks will enjoy
less load. This is especially important when the network is getting congested
because HTTP/1’s use of multiple connections for parallelism adds to the
problem.
CachedStaticFiles ClassReplaces the previous NoCacheStatics and bare StaticFiles mounts.
Adds deployment-aware Cache-Control headers to all static file
responses served from resource.web/.
| Asset type | DEV | UAT | PROD |
|---|---|---|---|
| JS / CSS | 60 s | 300 s | 86400 s (1 day) |
| Fonts / Sounds | 420 s | 2100 s | 604800 s (7 days) |
Fonts and sounds use a 7x multiplier over JS/CSS because they change
very rarely.
_static_max_age(asset_type) -> intReturns the deployment-aware cache duration in seconds for a given
asset type. Called internally by CachedStaticFiles and by custom
routes that serve file content.
/documents/{path} Custom RouteServes documents from local.documents/ and data.documents/ with
per-document cache control. Features:
CacheTtl from def_document — each document row can specifyCacheTtl column.NULL or 0 means no explicit caching (browser heuristic applies)._DOC_TTL_CACHE dict — in-memory cache of DocName -> CacheTtl304 Not Modified when the browser sends a matchingIf-None-Match header...UPDATE def_document SET CacheTtl = 86400
WHERE DocName = ‘company_logo’;
Report HTML responses are cached in Redis with a TTL determined by:
effective_ttl = max(module_yaml_cache_ttl, _Server_ttl, REPORT_TTL_DEFAULT)
REPORT_TTL_DEFAULT (from ObjConstants) — fallback TTL whendef_report specifies a value.cache.ttl — read via get_cache_ttl() on the_Server_ttl — set on the report class (e.g._Server_ttl = REPORT_TTL_DOCUMENTATION for documentation reports).The largest of the three values wins, ensuring that module authors
and operators can both raise — but not lower — the cache duration.
cythonize -3 -a -i WebServer.py
Compiling /home/axion/projects/axion/factory.web/WebServer.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.web/WebServer.py
Updated : 2025-10-02