Config file

For sites managed from code, put your settings in wp-content/softminal-cache.json. Its values override the stored settings, and the settings screens become read only with the note “Settings are managed by a config file”. Purge and preload still work.

{"lifetime":36000,"exclusions":["/members/*"],"modules":{"js":{"minify":true},"bloat":{"emoji":true}}}

Rules

  • The file must be a JSON object inside wp-content, at most 64 KB.
  • Unknown keys are ignored.
  • Changing the file clears the cache.
  • To use another path, define SOFTMINAL_CACHE_CONFIG in wp-config.php.
  • The For developers card on the Tools tab shows whether the file is in use or has errors.

Keys

enabled, safe_mode, mobile_cache, stale_while_revalidate, cache_404_feeds, logged_in_cache, browser_cache, compression, status_header, preload_after_purge, preload_speed, lifetime, exclusions, cookies, ignored_params and modules.

ModuleKeys
jsminify, defer, jquery_migrate, exclusions
cssminify, exclusions
fontslocal_google, swap, preload
imageslazy, first, iframes, dimensions, webp, avif, quality
bloatemoji, embeds, dashicons, xmlrpc, head_links, self_pingbacks, query_strings, heartbeat, revisions
script-managerrules

On Nginx, block direct access to the file. See Nginx setup.

Still stuck? Please write to us at support.softminal.com. Our team will help you.