Skip to content

How, and why, to create the Silverstripe Caching folder

If you’re working with Silverstripe CMS, the silverstripe-cache folder will:

  • Optimize performance by providing a dedicated location for the various temporary files that Silverstripe generates and stores to enhance its performance and the user experience. Otherwise these files can clutter other system directories, like the /tmp folder, and cause performance issues.
  • Make maintenance easier by giving you one folder to manage and clean up temporary files when you need to. This is especially useful when you’re troubleshooting or upgrading Silverstripe.
  • Lower the load on the server by preventing temporary files from accumulating in system-wide directories, where they can overload the server, slow it down, or even cause crashes.

Creating the silverstripe-cache Folder

  1. SSH into your container.
  2. Navigate to the root directory of your Silverstripe project, where your project’s primary files are located. Usually this should be:
    $cd /container/application/
  3. Create the silverstripe-cache folder:
    $ mkdir silverstripe-cache
  4. Assign the folder the preferred permissions:
    $ chmod 0777 silverstripe-cache
  5. Edit the .env file in your /container/application directory to add the new cache directory:
    SS_TEMP_PATH="/container/application/silverstripe-cache"
  6. Reboot the container for your changes to take effect.