Cache only a part of your site
In this case, you don't want the reverse-proxy to cache your entire site, but just a few URLs or paths.
Enabling cache only on specific path sections in the reverse-proxy provides a number of benefits, particularly when you want to optimize caching behavior for different types of content and traffic patterns.
This feature is available with Artica v4.50 Service Pack 1 or Artica v4.50 Hotfix 20240924-02
By enabling caching on paths that serve static content (e.g., /static/, /images/, or /css/), you can significantly improve performance. Static assets don’t change frequently, so they are ideal for caching.
- Faster response times:
Cached responses are served directly from reverse-proxy ’s cache instead of forwarding the request to the backend server.
- Reduced server load:
Backend servers handle fewer requests, as Nginx can directly serve cached content, freeing up resources for more dynamic requests.
For example, caching paths like /static/ or /assets/ can offload a lot of the static asset serving to reverse-proxy and reduce backend workload.
Caching certain paths allows you to apply different cache durations or policies to different types of content.
For example:
- Shorter cache durations for dynamic content (e.g.,
/api/might be cached for 5 minutes). - Longer cache durations for rarely changing static assets (e.g.,
/static/might be cached for 1 hour).
By enabling cache selectively on paths, you can finely control how different content is cached and how often the cache is refreshed.
1) Ensure the cache is globally enabled.
At the very least, you need to activate the cache system in the global settings.
This option will not enable caching on your site, but simply make the caching functionality available.
2) Enable caching on a specific path
- Open your website rule and select the
Pathstab - Set the path you want to cache
- In the
cache timefield, set the number of minutes you want the reverse proxy to retain the page data without having to query the backend.
if set to 0, the cache is disabled for this path.

- Click on
Build configurationto make rules in production mode - go to https://websniffer.com and post twice the full url to your website
- You should see the
X-Cache-Statusheader with the “HIT” value , indicating that your web page content is sent directly by the reverse-proxy without having to request the backend.
