Set the post-store notification handler.
Set the post-store notification handlerThis handler is called after successful storage operations. Use this for cache invalidation, notifications, or other post-processing.
- Parameters
-
| handler | The post-store callback function |
invalidation on storage
storage_scp scp{config};
scp.set_post_store_handler([](const auto& dataset,
const auto& patient_id,
const auto& study_uid,
const auto& series_uid,
const auto& sop_uid) {
auto& cache = global_query_cache();
cache.invalidate_if([&](const auto& key, const auto& result) {
return result.query_level == "PATIENT" ||
result.query_level == "STUDY" ||
result.query_level == "SERIES" ||
result.query_level == "IMAGE";
});
});