Skip to content

Add use case content for CI cache key

In the 12.5 Release Post, we identified that the documentation for cache:key:files doesn't include use-case content for why someone might use this feature. Additionally, the current content is very hard to understand.

Current content:

##### `cache:key:files`

If `cache:key:files` is added, one or two files must be defined with it. The cache `key`
will be a SHA computed from the most recent commits (one or two) that changed the
given files. If neither file was changed in any commits, the key will be `default`.

Questions:

  • Why would I add cache:key:files? What's the result? What's the value?
  • What are the "one or two files" that must be defined? Do I define them myself or are they automatically defined from the most recent commits?
  • What happens if I use the default key?

See here for original feedback: gitlab-com/www-gitlab-com!34283 (comment 247130430)