Type Definition kvarn_extensions::ForceCacheRules

source ·
pub type ForceCacheRules = Vec<(String, ClientCachePreference)>;
Expand description

Forces the responses matching rules to be cached according to their respective preference. Useful when you have compiled away cache, but still want images and fonts to be cached.

Rules can take three shapes.

  1. Matching all file extensions. Here, the rule str have to start with a .
  2. Path start with. Matches all responses which start with the rule. str has to start with /
  3. Path contains rule. For example, *target* matches /target/bin/kvarn, /a/really/long/path/with/some_target_name/in/it, but not /tar/get or /articles/rust_Target.

The priority for the Package extension is 16