Added cachebuster

Resolves #802.
This commit is contained in:
TimZ99 2019-10-22 20:39:33 +02:00
parent 0969f4043e
commit 627a93cc7c
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
2 changed files with 9 additions and 0 deletions

View File

@ -66,6 +66,13 @@ Archiving means that per day only one record is stored with averages. This still
The retention period tells the monitor how long to keep records in the archive table.
How to disable caching?
------------------------
Caching can be stopt by using a unique url. Place `%cachebuster%` in the url,
this will be replaced with the value of time().
Example: https://example.com?%cachebuster% will run as https://example.com?571768757.
Configuration
+++++++++++++

View File

@ -382,6 +382,8 @@ function psm_curl_get($href, $header = false, $body = true, $timeout = null, $ad
curl_setopt($ch, CURLOPT_USERPWD, $website_username.":".$website_password);
}
$href = preg_replace('/(.*)(%cachebuster%)/', '$0'.time(), $href);
curl_setopt($ch, CURLOPT_URL, $href);
$proxy_url = psm_get_conf('proxy_url', '');