Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/inference/src/cache_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ class FileStorageCacheManager final : public ICacheManager {
// Fix the bug caused by pugixml, which may return unexpected results if the locale is different from "C".
ScopedLocale plocal_C(LC_ALL, "C");
const auto blob_path = get_blob_file(id);
std::ofstream stream(blob_path, std::ios_base::binary);
writer(stream);
stream.close();
{
std::ofstream stream(blob_path, std::ios_base::binary);
writer(stream);
stream.flush();
}
// Force directory metadata refresh
OPENVINO_ASSERT(util::file_exists(blob_path), blob_path, " file not visible after write");
std::filesystem::permissions(blob_path,
std::filesystem::perms::owner_read | std::filesystem::perms::group_read);
}
Expand Down
Loading