# Optimizing Elixir CI in GitHub Actions

The Official GitHub Actions documentation suggests using the .lock file hash as the cache key, which makes the cache stale and the whole workflow slows down after some time.

There's a better way:

```yml
- name: Save dependencies cache
  uses: actions/cache/save@v4
  with:
    key: mix-${{ github.sha }}
    path: |
      _build
      deps
```

Read more: https://optimum.ba/blog/optimum-elixir-ci-with-github-actions


---

Created by: almirsarajcic
Date: December 04, 2024
URL: https://elixirdrops.net/d/dWeZKPbj
