Platform-independent Docker demo.
True query-frequency-aware cache warming for InterSystems IRIS Business Intelligence
(formerly DeepSee). The reusable dc.bi.CubeCacheWarmer package executes saved
dashboard and pivot queries after cube builds or synchronizations so IRIS can
repopulate its normal result cache before users open the dashboards.
This repository contains both:
packages/cube-cache-warmer,https://github.com/josaliba/deepsee-cube-cache-warmer/blob/main/module.xml at the repository root; andSource and issues: https://github.com/josaliba/deepsee-cube-cache-warmer. Licensed under the MIT License.
The module is published in the
InterSystems community package registry
as iris-bi-cube-cache-warmer. From an ObjectScript terminal connected to the
target Analytics namespace:
zpm "install iris-bi-cube-cache-warmer"
Then set each cube’s Cube Manager Post-Build and Post-Synchronize code to:
do ##class(dc.bi.CubeCacheWarmer.CacheWarmer).QueueCube("MyCube")
To install from a clone instead, for example to try unreleased changes, run
zpm "load /path/to/deepsee-cube-cache-warmer". See
deployment.md for source-based installation, upgrade,
verification, and uninstall.
flowchart TD A[Cube build or synchronization] --> B[Post-Build or Post-Synchronize hook] B --> C[QueueCube] C --> D[Background IRIS job] D --> E[Create QueuedCube history row] E --> F{Per-cube lock available?} F -- No --> G[Finish as Skipped] F -- Yes --> H[Wait until cube is queryable] H --> I[WarmCube]J[Direct application call] --> I J --> K[WarmPivot] J --> L[WarmMDX] M[User BI query] --> N[Query audit hook] N --> O[(QueryUsage frequency)] O --> P[True query-frequency ordering] I --> P P --> X[Replay most-called queries] Y[Dashboard open] --> Z[Dashboard audit hook] Z --> AA[(DashboardUsage fallback)] AA --> Q P --> Q[Warm remaining dashboard base pivots] P --> R[Warm remaining saved-default variants] I --> S[Warm remaining pivots] X --> L Q --> L R --> L S --> L K --> L L --> T[IRIS BI ExecuteDirect] T --> U[(IRIS BI result cache)] T --> V[(CacheWarmQuery history)] I --> W[(CacheWarmRun history)]
After a cube build or synchronization, Cube Manager queues a background
warmer:
do ##class(dc.bi.CubeCacheWarmer.CacheWarmer).QueueCube("MyCube")
Requests for the same cube are coalesced so concurrent hooks do not start
overlapping warmers.
The worker waits until the cube is queryable. Running separately prevents
warming from delaying Cube Manager or starting before the cube operation has
fully finalized.
IRIS BI’s ^DeepSee.AuditQueryCode hook consumes new native
^DeepSee.QueryLog entries and counts each normalized user query once.
The warmer first replays distinct queries in descending real execution
count, using last-executed time as the tie breaker. Its own replays are
explicitly excluded, preventing a frequency feedback loop.
The warmer then discovers saved dashboards and pivots not already covered
by those query keys. For each matching dashboard, it executes the saved pivot
and, when applicable, a second query containing its saved default filters.
Remaining saved pivots run afterward, while a case-insensitive in-memory set
prevents duplicate base-pivot execution.
Executing the MDX through IRIS BI’s standard result-set API repopulates its
normal query cache, allowing compatible dashboard requests to reuse the
cached results.
Every run and individual query result is saved persistently with timing,
success or failure, row and column counts, real query frequency, actual
execution order, dashboard attribution, and query type:
dc_bi_CubeCacheWarmer_Model.CacheWarmRundc_bi_CubeCacheWarmer_Model.CacheWarmQuerydc_bi_CubeCacheWarmer_Model.DashboardUsagedc_bi_CubeCacheWarmer_Model.QueryUsageSee Architecture and execution flow for the detailed
behavior of each path, including concurrency, dashboard ranking, and outcomes.
^DeepSee.AuditQueryCode.lastAccessed ordering as the zero-frequency fallback.@ runtime settings, sets, and%NOT filter values.The standalone package is verified on InterSystems IRIS 2025.1.5 and 2026.1.
The Docker demo builds on the intersystemsdc/iris-community:latest-em image,
currently IRIS 2026.1 Community Edition, and its CI run covers the image build,
both test suites, cube builds, saved dashboard and pivot creation, and cache
warming.
The checked-in Cube Manager registry deliberately uses the legacy registry
model supported by IRIS 2025.1. Newer IRIS releases automatically upgrade that
model in the compiled namespace; the same source has also been verified through
that upgrade path on IRIS 2026.1.
https://github.com/josaliba/deepsee-cube-cache-warmer/blob/main/module.xml IPM module definition for the standalone package
https://github.com/josaliba/deepsee-cube-cache-warmer/blob/main/LICENSE MIT License
packages/cube-cache-warmer/ Standalone package sources and unit tests
src/Demo/ Demo models, cubes, registry, and helpers
tests/Demo/ Demo smoke and cube-registry tests
Dockerfile, compose.yaml Demo container definition
iris.script Build-time setup: IPM load, demo import, cube builds
docs/ Demo, architecture, deployment, and operations guides
Every command below is the same in PowerShell, Command Prompt, WSL, and bash.
git clone https://github.com/josaliba/deepsee-cube-cache-warmer.git
cd deepsee-cube-cache-warmer
docker compose up -d --build --wait
The image build installs the cache warmer through IPM, enables Analytics for
the USER namespace, loads the demo application, creates 50 patients and 500
diagnoses, builds both cubes, saves two pivots and one dashboard, and warms
their queries. The first build takes a few minutes. The command returns once
IRIS reports healthy, and the demo is then complete.
localhost:1972USER_SYSTEM, password SYSOpen an ObjectScript terminal in the demo namespace:
docker compose exec iris iris session IRIS -U USER
Run the package and demo test suites:
docker compose exec iris iris session IRIS -U USER "##class(Demo.Util.Tests).RunAll()"
Recreate the demo content at any time from the terminal:
set sc=##class(Demo.Util.Analytics).SetupDemo(50,500,1,1)
do $SYSTEM.OBJ.DisplayError(sc)
The credentials and the HTTP-only web server are intended only for an isolated
development workstation.
IPM packages the module from the root https://github.com/josaliba/deepsee-cube-cache-warmer/blob/main/module.xml. In the demo terminal, run:
zpm "package iris-bi-cube-cache-warmer -path /home/irisowner/dev/dist/iris-bi-cube-cache-warmer-1.0.1"
This writes dist/iris-bi-cube-cache-warmer-1.0.1.tgz into the repository
checkout, where Git ignores it. The archive holds the package sources and a
https://github.com/josaliba/deepsee-cube-cache-warmer/blob/main/module.xml, so an extracted copy loads with zpm "load <directory>". See
deployment.md for IPM installation, source-based
installation, Cube Manager configuration, upgrade, verification, and uninstall
instructions.
docker compose up -d --build --wait # Build the image and start the demo
docker compose logs -f iris # Follow IRIS logs
docker compose exec iris iris session IRIS -U USER # Terminal
docker compose exec iris iris session IRIS -U USER "##class(Demo.Util.Tests).RunAll()" # Tests
docker compose stop # Stop the container and keep its state
docker compose down # Remove the container; the next start is a fresh demo
docker compose build --pull # Rebuild on the newest community image
The demo keeps no Docker volume. Stopping and starting preserves data inside
the container, while docker compose down discards it and the next up
recreates the demo from the image. Community Edition images carry a license
that expires, so rebuild with --pull when a cached image refuses to start.
Copy .env.example to .env to override the image tag or the host ports, for
example when a local IRIS instance already uses port 1972.
The .env file, generated archives, and local editor settings are excluded
from Git. Do not commit credentials or other sensitive material.
Before production deployment, review authentication, TLS, authorization,
licensing, auditing, backups, data retention, resource limits, and applicable
healthcare privacy requirements. Cache warming consumes CPU and I/O; deploy a
deliberate workload rather than attempting to warm every possible user filter.
This project is released under the MIT License. The demo runs on
InterSystems IRIS Community Edition, which carries its own license terms; review
the target IRIS licensing before deploying the package elsewhere.