dreamwidth/dw-free — pull request #243 by afuna (2013-01-31 07:02:05+00:00)
Title: (Bug 4860) Pre-fetch textcaptcha items and store them in the DB

We should be nice to both our users and the textcaptcha service. We
pre-fetch
several hundred items with a 1-second delay so we don't hammer the
textcaptcha service with too many requests too close together at active
hours.

When we need a captcha, we check our DB first. If we run out, then we do
a
remote fetch. This should also make the captcha show up more quickly to
users.

Pinging @xb95 to look over how hard this will hit us. It didn't seem to
be suitable for memcache since we only look up each captcha *once*, and
then never again, but this does mean a DB hit every time we need a
captcha (lost info, long comment threads).