corestack_ varnish_ set
Switch a site's Varnish on or off.
When to use it
Switch Varnish on or off for a Magento 2 row. It is on by default; switching it off makes Magento serve pages from its built-in full-page cache, and the row stays off (the platform never switches it on again by itself) until it is switched on here or in the Corefinity Control Panel.
- On: saved → picked up by the platform → Varnish started → Magento pointed at Varnish → cache check → healthy. If the cache check finds the store cannot be cached (for example every page sets a cookie), the row is put back on Magento's built-in cache and the task says why.
- Off: Magento switched to its built-in cache → Varnish cleared → saved → picked up. Magento moves first, so nothing is cached twice; if Magento cannot be switched, nothing else changes.
Without version, switching on keeps the version the row had last, else the default (7.7). Read corestack_varnish_get first: options[] with allowed: true lists the versions you may name.
The change takes about a minute and answers a task on its varnish_set operation (follow it with corestack_site_operation_get). With apply: window it waits for the row's next maintenance window and answers at once {operation: null,; track it with corestack_pending_changes_list. Two outcomes complete without failing: pending_code (the site has no code yet; Magento is configured at the first deployment) and magento_config_failed (Varnish runs but Magento stays on its built-in cache; repair with corestack_function_run and magento_varnish_config).
Ask for it
Using the Corefinity MCP server, call corestack_varnish_set with site_id 4211, enabled true, version 8.0, apply window. (Switch a site's Varnish on or off.) Tell me what it returned.Inputs
Now (the default), or in the row's next maintenance window. Defaults to now.
nowwindowtonightTrue switches Varnish on, false switches it off.
The row, a Magento 2 site or one of its environments. At least 1.
Only when switching on, one of options[].version with allowed: true, such as 8.0.
Example call
{
"name": "corestack_varnish_set",
"arguments": {
"site_id": 4211,
"enabled": true,
"version": "8.0",
"apply": "window"
}
}If it is refused
| Reason | What to do |
|---|---|
unchanged | Varnish is already in that state. |
varnish_not_offered | The row is not Magento 2, or not on a platform version Varnish runs on yet (it is after this site's platform update). |
varnish_too_small | The memory share Varnish would take is below the 512 MiB floor (for example RabbitMQ on at the medium or cs4 size). Recovery: a larger package, or RabbitMQ off. |
memory_split | Corefinity staff have divided this environment's memory between its services by hand, Redis's included, and the switch would undo that; nothing was changed. The person asks support to make the change. |
version_unsupported | The version is not allowed for this Magento; the message names the offered versions and why. |
change_in_progress | Or busy: another change on the row is unfinished; try again when it ends. |
change_pending | A change is already waiting for the maintenance window. |
feature_off | Waiting for the maintenance window is not available yet; send apply: now. |
managed_elsewhere | Another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done. |
image_not_offered | The Varnish version this change needs is not one Corefinity offers right now (withdrawn, or not published yet). Nothing was changed; send it again once Corefinity offers that version. |
invalid_arguments | The arguments do not match the tool's input schema, or the Control Panel refused a field. Fix the fields named in the answer and call again. |
tenant_mismatch | The object does not exist or the token may not see it. Check the id. |
scope_required | The token lacks a scope this call needs. Open the link in the answer to add it, then call again. |
pin_refused | The grant is limited to chosen clusters, sites or environments, and this call is outside them. Open the link in the answer to widen it. |
rate_limited | Too many calls. Wait for the number of seconds the answer names. |
temporarily_unavailable | The Control Panel could not answer just now. Nothing was started; try again shortly. |
internal_error | Something went wrong on our side. Quote the trace id to support. |