The `HOMEBREW_CACHE` should be reordered to have a format something like the following: ``` formula/version/source/file.tgz formula/version/bottles/bottle.tar.gz resources/resource-$SHA256.tar.gz patches/patch.diff ``` This will allow simplifying the cleanup of the cache without needing to know as much about formula state.