class RedactionIdCache

Defined at line 22 of file ../../src/developer/forensics/utils/redact/cache.h

Associates unique integer identifiers with strings, e.g. the string "12345" will be the only

string to have an ID X. Once the number of strings exceeds |capacity_| the least recently used

string "x" will be deleted from the cache to make room for the new string. If "x" is later used

again, "x" will be assigned a new unique integer identifier.

Public Methods

void RedactionIdCache (inspect::UintProperty size_node, int starting_id, size_t capacity)

Defined at line 11 of file ../../src/developer/forensics/utils/redact/cache.cc

int GetId (const std::string & value)

Defined at line 17 of file ../../src/developer/forensics/utils/redact/cache.cc

void RedactionIdCache (const RedactionIdCache & )

Require move-only semantics are required because the cache is stateful.

Defined at line 30 of file ../../src/developer/forensics/utils/redact/cache.h

RedactionIdCache & operator= (const RedactionIdCache & )

Defined at line 31 of file ../../src/developer/forensics/utils/redact/cache.h

void RedactionIdCache (RedactionIdCache && )

Defined at line 32 of file ../../src/developer/forensics/utils/redact/cache.h

RedactionIdCache & operator= (RedactionIdCache && )

Defined at line 33 of file ../../src/developer/forensics/utils/redact/cache.h