ets-berkeley-edu/calcentral — pull request #1025 by ctweney (2013-05-01 21:47:58+00:00)
Title: CLC-1667 Warm up user caches in the background

JIRA: https://jira.media.berkeley.edu/jira/browse/CLC-1667

The UserVisit table records every time a user hits the /api/my/status endpoint. It's separated from the UserData table so that we don't have a lot of writes to the latter, and to keep the cost of reindexing low.

For users who've visited in the last 30 days, expire and then warm up their cache every 10 minutes. Default cache timeout changed to 20 minutes (I might make this longer after we've tested the feature more).

For a user who hasn't been seen in 60 days, drop them off the UserVisit table, which keeps the table size manageable.