comparison OrthancFramework/Sources/FileStorage/StorageAccessor.h @ 5420:d37dff2c0028 am-new-cache

Optimized the MemoryStringCache to prevent loading the same file multiple times if multiple users request the same file at the same time
author Alain Mazy <am@osimis.io>
date Mon, 13 Nov 2023 17:01:59 +0100
parents 0ea402b4d901
children 48b8dae6dc77
comparison
equal deleted inserted replaced
5419:ac4e9fb87615 5420:d37dff2c0028
106 106
107 void ReadRaw(std::string& content, 107 void ReadRaw(std::string& content,
108 const FileInfo& info); 108 const FileInfo& info);
109 109
110 void ReadStartRange(std::string& target, 110 void ReadStartRange(std::string& target,
111 const std::string& fileUuid, 111 const FileInfo& info,
112 FileContentType fullFileContentType,
113 uint64_t end /* exclusive */); 112 uint64_t end /* exclusive */);
114 113
115 void Remove(const std::string& fileUuid, 114 void Remove(const std::string& fileUuid,
116 FileContentType type); 115 FileContentType type);
117 116
132 131
133 void AnswerFile(RestApiOutput& output, 132 void AnswerFile(RestApiOutput& output,
134 const FileInfo& info, 133 const FileInfo& info,
135 const std::string& mime); 134 const std::string& mime);
136 #endif 135 #endif
136 private:
137 void ReadStartRangeInternal(std::string& target,
138 const FileInfo& info,
139 uint64_t end /* exclusive */);
140
141 void ReadWholeInternal(std::string& content,
142 const FileInfo& info);
143
144 void ReadRawInternal(std::string& content,
145 const FileInfo& info);
146
137 }; 147 };
138 } 148 }