From ddf785b7fca871abcfdaa216aee4bce68c879183 Mon Sep 17 00:00:00 2001 From: MAEDA Go Date: Mon, 7 Sep 2026 18:38:25 +0900 Subject: [PATCH 3/3] Document the bootsnap cache in doc/INSTALL. --- doc/INSTALL | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/INSTALL b/doc/INSTALL index 0711145d3..07c82b000 100644 --- a/doc/INSTALL +++ b/doc/INSTALL @@ -117,6 +117,29 @@ if you need to override Rails environment settings such as log level, SSL enforcement, or custom Active Job adapters. Restart the application after editing this file. +== Boot cache + +Redmine uses bootsnap to speed up its startup. On the first start it writes +a cache of compiled Ruby files and resolved load paths under tmp/cache, and +later starts reuse it. The cache can be deleted at any time by running: + bin/rails tmp:cache:clear + +It is rebuilt on the next start. + +If tmp/cache is on slow storage, such as a network file system, reading the +cache can take longer than the work it saves, and startup gets slower +instead of faster. In that case, move the cache to local storage by setting +the environment variable BOOTSNAP_CACHE_DIR to a directory that the user +running Redmine can write to, for example: + BOOTSNAP_CACHE_DIR=/var/cache/redmine bin/rails server -e production + +The cache then lives in a "bootsnap" subdirectory there, which +`bin/rails tmp:cache:clear` does not remove; delete it yourself when you +want to clear the cache. + +Alternatively, start Redmine without the cache by setting DISABLE_BOOTSNAP=1: + DISABLE_BOOTSNAP=1 bin/rails server -e production + == Database server configuration When using MySQL with Redmine 5.1.1 or later, it is necessary to change -- 2.55.0