This is no issue, but a question. We are using the cache created in node_modules/.cache/NX in our CI environment. We distribute the NX cache between our agents. The size of the cache enlarges fast :).
Is there a way to clear this cache, if possible by a certain depth?
I have searched the examples for distributed NX and the source code, but did not find this option. But maybe I have overlooked it :).
Is there a way to clear this cache
- you can move it outside node modules and
rm -rfon it (ofc that can be done within node_modules)
if possible by a certain depth
- I don't think so (@jaysoo pls correct me if I'm wrong)
Nx Cloud is the best solution for distributing the cache for CI and local development as it stores the cache on a remote server.
Not sure what would classify as the depth of the cache. I think if you were caching this in CI, you would likely want to do it per PR... so that it clears.
Hopefully, that answers the question.
@FrozenPandaz "The best solution" is always relative to a point of view. For me the best solution has to be open source for instance. So having a way to clear the cache, for those of us managing it on our own infrastructures, specifying for instance "only the cache of Cypress" would be useful :slightly_smiling_face:.
Most helpful comment
@FrozenPandaz "The best solution" is always relative to a point of view. For me the best solution has to be open source for instance. So having a way to clear the cache, for those of us managing it on our own infrastructures, specifying for instance "only the cache of Cypress" would be useful :slightly_smiling_face:.