4 ms·
Depending on your read and write patterns, overflowing even every few days might be appropriate, and also obfuscate the creation time [1] more. [1] https://new
by s4i 2y ago
Depending on your read and write patterns, overflowing even every few days might be appropriate, and also obfuscate the creation time [1] more.
[1] https://news.ycombinator.com/item?id=40272446 https://news.ycombinator.com/item?id=40272446
- j-pb 2y agoGreat point, using a u16 is probably the best choice then. As it give locality within 65.53600 seconds (roughly a minute) without exposing sensitive timing information, and should cover most real world write scenarios.
- j-pb 2y agoA small additional improvement might be to also create a random 16bit salt at startup and then xor the timestamp with that, to leak even less information. That way entries will still have locality without leaking ms timestamp info.