Allow configuration of cache dir
See original GitHub issueFeature request
Hi! I’d like to propose a small idea that would allow developers to alter the location of the .next/cache
directory in order to implement the solution for no-cache in another way that doesnt seem documented: an environment variable. (or something like the way Yarn does it yarn config set cache-folder [location]
)
Is your feature request related to a problem? Please describe.
This request stems from the fact that some CI providers dont have the features like Circle-CI have to easily configure the directories that should be stored between builds (but instead provide a environment variable that points to a root folder what will be persisted, i.e. Wercker does this)
Describe the solution you’d like
By having a simple environment variable that can be read during the npm run build
this would effectively allow a developer to change / utilize a specific location for storing the cache. This could ofcourse default to .next/cache
but woudl also ease the other CI examples as mentioned on the no-cache.md
-page.
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:10
- Comments:18 (3 by maintainers)
Having the exact same issue running Next.js in a Google App Engine environment, where only
/tmp
is writableI’m running next.js in a google cloud function and the only writeable part of the file system is
/tmp
. Would be great to be able to point the cache there.