Skip to content
Kamil Mrzygłód edited this page Feb 21, 2023 · 7 revisions

ACE comes with in-built functionality of caching mechanism, which is an opt-out feature. Cache is based on saving What If responses coming from ARM endpoints and depending on used cache provider, its behavior might change slightly.

As for now, the only provider available is local cache. Future releases are planned to bring remote locations, which can be used e.g. on ephemeral agents.

Below you can find detailed instruction of how use any of the available providers.

Local

Local cache provider saves cached What If responses as files in the working directory of ACE. Each response is saved as a separate .cache file named as <cache-key>.cache.

ACE uses .ace directory to store cached items. User running ACE must have permissions to create that directory and files inside it.

Cache key is calculated as SHA1 hash based on the following values:

  • scope ID
  • resource group name (if available)
  • template content
  • parameters values (both inline and from parameters file)

This means, that if you want to invalidate cache, you have two options:

  • you modify any of the values used to calculate cache key
  • you pass --disable-cache flag when running ACE

ACE is unaware of any changes in your cloud infrastructure meaning if there were any changes related to your infrastructure, which might have impacted calculation, you should either include them in your template, or invalidate local cache before performing calculation.

Clone this wiki locally