diff options
Diffstat (limited to 'pingora-cache/src/meta.rs')
-rw-r--r-- | pingora-cache/src/meta.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/pingora-cache/src/meta.rs b/pingora-cache/src/meta.rs index 206b320..8ed034e 100644 --- a/pingora-cache/src/meta.rs +++ b/pingora-cache/src/meta.rs @@ -595,8 +595,19 @@ fn load_file(path: &String) -> Option<Vec<u8>> { } static HEADER_SERDE: Lazy<HeaderSerde> = Lazy::new(|| { - let dict = COMPRESSION_DICT_PATH.get().and_then(load_file); - HeaderSerde::new(dict) + let dict_path_opt = COMPRESSION_DICT_PATH.get(); + + if dict_path_opt.is_none() { + warn!("COMPRESSION_DICT_PATH is not set"); + } + + let result = dict_path_opt.and_then(load_file); + + if result.is_none() { + warn!("HeaderSerde not loaded from file"); + } + + HeaderSerde::new(result) }); pub(crate) fn header_serialize(header: &ResponseHeader) -> Result<Vec<u8>> { |