kanidmd_core/https/cache_buster.rs
1//! Used for appending cache-busting query parameters to URLs.
2//!
3
4#[allow(dead_code)] // Because it's used in templates
5/// Gets the git rev from the KANIDM_PKG_COMMIT_REV variable else drops back to the version, to allow for cache-busting parameters in URLs
6#[inline]
7pub fn get_cache_buster_key() -> String {
8 option_env!("KANIDM_PKG_VERSION_HASH") // this comes from the profiles crate at build time
9 .unwrap_or(env!("CARGO_PKG_VERSION"))
10 .to_string()
11}