comparison OrthancServer/ServerContext.cpp @ 2507:99116ed6f38c

invalidate DicomCache when deleting instance
author amazy
date Mon, 26 Mar 2018 18:31:40 +0200
parents 878b59270859
children 2e879c796ec7
comparison
equal deleted inserted replaced
2506:51b91ead6c38 2507:99116ed6f38c
560 560
561 bool ServerContext::DeleteResource(Json::Value& target, 561 bool ServerContext::DeleteResource(Json::Value& target,
562 const std::string& uuid, 562 const std::string& uuid,
563 ResourceType expectedType) 563 ResourceType expectedType)
564 { 564 {
565 if (expectedType == ResourceType_Instance)
566 {
567 // remove the file from the DicomCache
568 boost::mutex::scoped_lock lock(dicomCacheMutex_);
569 dicomCache_.Invalidate(uuid);
570 }
571
565 return index_.DeleteResource(target, uuid, expectedType); 572 return index_.DeleteResource(target, uuid, expectedType);
566 } 573 }
567 574
568 575
569 void ServerContext::SignalChange(const ServerIndexChange& change) 576 void ServerContext::SignalChange(const ServerIndexChange& change)