CacheGate is a high-performance caching proxy server that accelerates response times and reduces backend load by caching frequently requested data. It intercepts incoming requests, serves cached content when available, and significantly improves overall efficiency. CacheGate is ideal for APIs and web delivery, offering flexible caching and expiration rules for optimized performance.
Download and run directly:
To start using the application, first create a configuration JSON file. This file contains the necessary settings such as the port number, the remote URL to which requests will be proxied, the time-to-live (TTL) for cached responses, and the list of URLs that should be cached.
Here is an example of a configuration file:
{
"port": "8091",
"remote_url": "http://localhost/test",
"ttl": 5,
"url_to_cache": [
"/api/v1/products/*",
"/api/v1/users/*",
"/static/*",
"/assets/images/*",
"/docs/*"
]
}
In this example:
"port": The port number on which the proxy server will listen."remote_url": The remote URL where requests will be forwarded."ttl": The time-to-live for cached responses, in minutes."url_to_cache": A list of URL patterns that should be cached. The wildcard
* is used to match multiple endpoints or resources, for example,
/api/v1/products/* will cache all product-related API requests.
Save this JSON file and provide its path when starting the server.
Starts a server and starts caching and serving requests.
Example using command:
CacheGate -config /path/to/config.json