question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow configuration of cache dir

See original GitHub issue

Feature 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:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
artoalecommented, Mar 11, 2021

Having the exact same issue running Next.js in a Google App Engine environment, where only /tmp is writable

10reactions
jrydbergcommented, Feb 28, 2021

I’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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow configuration of cache dir #10111 - vercel/next.js - GitHub
Feature request Hi! I'd like to propose a small idea that would allow developers to alter the location of the .next/cache directory in...
Read more >
squid : cache_dir configuration directive
Store cache objects only in memory. Suggested Config: # Uncomment and adjust the following to add a disk cache directory. #cache_dir ufs /usr/local/squid/ ......
Read more >
Configuration cache - Gradle User Manual
The configuration cache state is stored on disk in a directory named .gradle/configuration-cache in the root directory of the Gradle build in use....
Read more >
cache dir | Data Version Control - DVC
cache dir. Set/unset the cachecache directory location intuitively (compared to using dvc config cache ), or shows the current configured value.
Read more >
Configure directories for local cache generation—ArcGIS Server
Local cache directories on the server are only used with caches that use the compact storage type. The server writes one bundle file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found