CacheBuster
2 functions, invoked through the cpanel_uapi tool.
cpanel_uapi(service_id, module="CacheBuster", function, params). Live availability depends on the cPanel features JetHost has enabled on your account — call list_cpanel_operations to see what is active.read GET#
Return web browser cached file override ID
This function returns the current CacheBuster id. The system uses this ID to force the browser to fetch a new resource when that resource already exists in the web browser cache. This is useful when an application has updated the resource on the server. You should append this ID to the end of the url in the query-string. For example, if you are accessing a url like:
https://example.com/styled/basic/sprites/icon_spritemap.css
To force the browser to fetch the updated version, you would append the following:
https://example.com/styled/basic/sprites/icon_spritemap.css?<CacheBusterID>
Note
The application that updates the resource at this url on the server must call the CacheBuster::update function when it updates the resource to signify that update.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains:
update GET#
Create web browser cached file override ID
This function generates a random integer (the CacheBuster ID). Use this ID to work with and around a browser's caching mechanism.
No parameters.
Response — normalized as { ok, data, errors[], warnings[] }; data contains: