Skip to content

CacheManager UI

Intro

XalokNext:v7 adds a new UI targeted at developers that aims aiding debugging issues with ESI fragments and/or frontend cache (usually Varnish) tags.

To access it, in the admin's main menu go to the "Tools" menu (translated as "Heramientas" or sometimes "Administracion") and click the "Cache manager" menu option. Or go to __ADMIN_URL__/cache/list URL.

Setup

In case the tool doesn't work, check the sections below to make sure your environment is setup correctly.

FosHttpCacheBundle

This tool relies on FosHttpCacheBundle being setup in your local environment.

Import configuration

Make sure that ../../config/misc/varnish.yml is included in your apps' config. For dev environments, this means adding this line:

yaml
# app/admin/config/config_dev.yml and app/public/config/config_dev.yml
imports:
  # other imports
  - { resource: ../../config/misc/varnish.yml }

in both app/admin/config/config_dev.yml and app/public/config/config_dev.yml.

varnish.yml

Then make sure app/config/misc/varnish.yml file exists - there should be a varnish.yml.dist file that you can use to create it.

varnish_servers parameter

Due to some misconfiguration, after doing the above steps you might receive an error telling you that fos_http_cache.proxy_client.varnish.http.servers expects an array, but received a string.

Check the value of the varnish_servers parameter in your app/config/parameters/local.yml. It should be:

yaml
# app/config/parameters/local.yml
parameters:
  # other parameters here
  varnish_servers:
    - servicios_varnish

Note: if it was varnish_servers: servicios_varnish on one line, it must look like the above, it requires an array, not a string.

Usage

Docker environment

When using it in a Docker environment, you must use an absolute URL for it to work. This is because the code is being run in the php-fpm container, but this must connect to the nginx container to download the responses.

Most commonly, the URL should be prefixed with: http://host.docker.internal:8082/

wfcms-docker

For wfcms-docker (a docker environment that supports multiple installations), the URL should be prefixed with: http://nginx/