Skip to main content
Version: 2.16.0

Caching

From Halo version v2.4.12, the ICAP server includes support for caching adapted files. This improves performance when serving commonly requested files that have already been processed by the Halo CDR engine.

The cache is implemented and maintained by the ICAP server (icap-server) and is backed by Halo’s file storage mechanism.

Once the cache is full, the oldest items are deleted.

The cache only persists files that have been adapted with a valid response from Halo.
This includes:

  • Rebuilt files
  • Files that failed to rebuild but were successfully analysed

The following files are not cached:

  • Bypassed files
  • Blocked files
  • Errored files

Cache size

The ICAP cache has a fixed size of 1 GB.
This size was selected to balance ease of maintenance with I/O performance.

Cache deployment

The cache is deployed automatically as part of the icap-server installation.

Please follow the relevant deployment instructions for the ICAP server.
Note that the cache is automatically cleared whenever the icap-server is installed or upgraded.


Clearing the cache

Although the cache is cleared automatically during installation and upgrades, you may need to manually clear it in some scenarios.

Follow the steps below to empty the cache.

Step 1 – Connect to the ICAP server inside the Halo cluster

Use kubectl to forward a local port to the icap-server-api service running in the cdrplatform namespace.

kubectl port-forward service/icap-server-api <local-port>:8080 -n cdrplatform


### Step 2 - make a delete request on the exposed port
For convenience, the ICAP-server ships with an API for maintaining the cache. the port that was opened in the last step can now be used to clear the cache.

curl --request DELETE "http://localhost:<local-port>/api/v1/cache"