MCPcopy Create free account
hub / github.com/ByConity/ByConity / buildCacheFileName

Function buildCacheFileName

src/Storages/DiskCache/KeyIndexFileCache.cpp:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43namespace
44{
45 String buildCacheFileName(const String & key, UInt64 file_size)
46 {
47 auto escaped_key = escapeForFileName(key);
48 WriteBufferFromOwnString buf;
49 writeIntText(file_size, buf);
50 writeChar('_', buf);
51 writeString(escaped_key, buf);
52 writeString(".idx", buf);
53 return buf.str();
54 }
55
56 bool tryParseCacheFileName(const String & file_name, String & key, UInt64 & file_size)
57 {

Callers 3

removeExternalMethod · 0.85
getMethod · 0.85
cacheFileNameMethod · 0.85

Calls 5

escapeForFileNameFunction · 0.85
writeIntTextFunction · 0.85
writeCharFunction · 0.85
writeStringFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected