cache mirador
Pre-warm the Mirador IIIF viewer cache for paged content items. When the IIIF server has not yet cached a paged item’s child images, the first visitor to that page experiences slow load times while the server processes the images. This command fetches a list of paged content URLs from either a JSON endpoint or a file, reads the Mirador settings embedded in each page’s Drupal settings JSON, and warms the related IIIF resources before real visitors arrive. Pass exactly one of:--endpoint JSON endpoint returning URL objects
--url-file text file with one URL per line
| Flag | Default | Description |
|---|---|---|
--delay | 1s | How long to sleep between HTTP warm requests. |
--endpoint | JSON endpoint returning an array of objects with a url field. Mutually exclusive with --url-file. | |
--limit | 0 | Maximum number of URLs to warm. Use 0 to paginate through all endpoint pages. |
--mode | ttfb | Mirador warm mode: ttfb, browse, or full. |
--restart | false | Discard saved Mirador warm progress and restart from the beginning. |
--url-file | Path to a file containing one URL per line. Mutually exclusive with --endpoint. | |
--workers | 1 | Number of concurrent warm workers. |
When to run it
Runcache mirador after:
- Deploying a new version of your Islandora site.
- Restarting the IIIF server.
- Ingesting a large batch of new paged content.
drupal-settings-json, reads the Mirador manifest ID, then warms selected IIIF URLs from the manifest.
Pass exactly one input source:
--endpointfor a paginated JSON feed of URL objects.--url-filefor a plain text file with one URL per line.
Warm modes
Use--mode to choose what gets warmed from each manifest:
ttfbdefault: the first full image URL and the first 10 thumbnails.browse: every full image URL after the first, plus thumbnails starting at 11 if present.full: the first full image URL, all thumbnails, and every remaining full image URL.
Resume behavior
Progress is saved under~/.sitectl as URLs complete, so canceling a long run does not force a full restart next time.
- Normal reruns resume automatically.
--restartdiscards saved progress and starts over.
Request pacing
Use--delay to control how long the command sleeps between HTTP warm requests. The default is 1s.
