Menu

Our scan counter is one Redis sorted set per month, holds a barcode and a number, and cannot be turned back into anyone's history
📰

Our scan counter is one Redis sorted set per month, holds a barcode and a number, and cannot be turned back into anyone's history

DEV Community: redis·Daniel Pertu·1 day ago
#VxAyKDiF
#devtoredis#devto#dev#month#barcode
Long article (978 words) — no AI summary yet.
Reading 0:00
15s threshold

Munchable is a food scanner, and the privacy page promises something specific: no advertising or analytics trackers of any kind, and a barcode lookup that carries nothing about you. That promise has a cost. The moment you decide not to log scans, you lose the cheapest way to answer "what do people actually scan?", and that is a question the product has real use for.

The answer we landed on is a counter that is deliberately too dumb to be a log. The whole record is one Redis sorted set per calendar month, with the key scans:m:2026-12 and the shape:

member = barcode score = number of lookups this month

Enter fullscreen mode

Exit fullscreen mode

That is all of it. No user id, no device, no session, no timestamp finer than the month. It cannot be turned back into anyone's history, because the history was never written down: nothing in the set says who looked, only how many times a barcode was looked up in total.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.