A CSV file or SQLite database won't do, it's gotta be a dedicated database server which can scale if Bitcointalk and consequentially the image proxy server is hammered with incoming requests.
This is not my first rodeo NAT, I've written a decent amount of performance-critical software in my time. I wouldn't have suggested something that I didn't have first-hand experience with, so trust me when I say that slurping up a text file into a hash table at startup or relying on SQLite (either file-backed or
:memory: style) will scale just fine for this particular problem.