You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow specifying AppCDS cache location and use safer default #9667
JRuby is frequently installed via a package manager that makes the install location read-only. This prevents the AppCDS cache (and any future caches stored in lib) from being writable, leading to warnings or errors at startup.
We need to provide a standard way to specify the location of the AppCDS jsa cache file. Additionally, this cache should probably default to somewhere under $HOME/.cache as is now common on most *nix platforms.
I like JRUBY_CACHE_HOME as an env var after looking this Debian patch that mentions XDG_CACHE_HOME.
I'm also coming around to defaulting to a subdirectory of $HOME/.cache which seems to be a standard these days. We would create directories as necessary in that location to separate JRuby AppCDS caches (and other JRuby caches in the future, like Prism parser dumps) from other non-JRuby caches. We would also need to continue separating those caches by the location of jruby.jar and the JDK used.
Note that the Debian patch above also defaults to a location under $HOME/.cache.
Additional debate: how much of this should ship with JRuby 10.0.x given that it is a stable branch. The config variable would be purely additive, but the new default cache location would be a surprise.
Since we only use the cache location for JSA right now, I have gone with JRUBY_JSA_HOME in #9698. That would not conflict with a future general "cache home" variable, and may eventually be defunct if we start using the new AOT features of Java 25+.
We'll call this one resolved with #9698 and if there's a need for a more general cache location config in the future we'll cross that bridge.
Activity
headius commentedon Sep 11, 2026
I like JRUBY_CACHE_HOME as an env var after looking this Debian patch that mentions XDG_CACHE_HOME.
I'm also coming around to defaulting to a subdirectory of
$HOME/.cachewhich seems to be a standard these days. We would create directories as necessary in that location to separate JRuby AppCDS caches (and other JRuby caches in the future, like Prism parser dumps) from other non-JRuby caches. We would also need to continue separating those caches by the location of jruby.jar and the JDK used.Note that the Debian patch above also defaults to a location under
$HOME/.cache.Additional debate: how much of this should ship with JRuby 10.0.x given that it is a stable branch. The config variable would be purely additive, but the new default cache location would be a surprise.
headius commentedon Sep 16, 2026
Since we only use the cache location for JSA right now, I have gone with
JRUBY_JSA_HOMEin #9698. That would not conflict with a future general "cache home" variable, and may eventually be defunct if we start using the new AOT features of Java 25+.We'll call this one resolved with #9698 and if there's a need for a more general cache location config in the future we'll cross that bridge.
headius commentedon Sep 16, 2026
Fixed by #9698.