Exclude path cache [github action]

Hi
I want set path for github action cache is ${{ github.workspace }}/project and exclude ${{ github.workspace }}/project/exclude_cache.txt

- name: Cache
        uses: actions/cache@v2
        id: cache-build
        with:
          path: "${{ github.workspace }}/project"
          key: ${{ runner.os }}-project-${{ hashFiles('**/pom.xml') }}
          restore-keys: ${{ runner.os }}-project

How to add exclude file in path of cache?

Hi, you should be able to exclude files and folders with the ! character.

With that being said, I believe there is an existing issue open as there appears to be inconsistent behaviour:

We recommend following along on those two issues to receive updates on when they may be resolved.