title: Clearing the pipeline cache with Gitlab CI
body: <p>Is is possible to invalidate or clear a pipeline cache with Gitlab CI after a pipeline completes?</p>
  
  <p>My <code>.gitlab-ci.yml</code> file has the following global cache definition</p>
  
  <pre><code>cache:
    key: "%CI_PIPELINE_ID%"
    paths:
      - './msvc/Project1`/bin/Debug'
      - './msvc/Project2`/bin/Debug'
      - './msvc/Project3`/bin/Debug'
  </code></pre>
  
  <p>The <code>cache-key</code> value specifies that each pipeline should maintain it's own cache, which is working fine, but the cache file continues to exist after the pipeline completes. With hundreds of pipelines being run, the size starts to add up and manually deleting the cache folder on our machine isn't a great solution.</p>
  
  <p>I tried adding a cleanup job at the end of the pipeline</p>
  
  <pre><code>cleanup:
    stage: cleanup
    script:
    - rm -rf './msvc/Project1/bin'
    - rm -rf './msvc/Project2/bin'
    - rm -rf './msvc/Project3/bin'
    when: always
  </code></pre>
  
  <p>which deletes the local files, but won't delete them from the cache.</p>
  
  <p>Am I missing something here? </p>
  
  <p>Currently running Gitlab-EE 10.3.3</p>