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.
uapi --output=jsonpretty \ --user=username \ CacheBuster \ read
{- "apiversion": 3,
- "func": "read",
- "module": "CacheBuster",
- "result": {
- "data": {
- "cache_id": 11381138
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}