diff --git a/docs/faq.rst b/docs/faq.rst index 78e240ac..1771aeff 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -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 +++++++++++++ diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php index 43bb55ee..ebadaa30 100644 --- a/src/includes/functions.inc.php +++ b/src/includes/functions.inc.php @@ -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', '');