Open blreams opened 10 years ago
I think option 2 is the best one. This would prevent an end user from having to wait on a memcache miss. I was intending for the code/update.py class to contain the functions necessary to update the memcache.
For example, after the game scores are updated for a week then a call to update_week_results with the week and year number would update the memcache.
There are also in functions in code/database.py that can update the memcache.
A couple of things I have been thinking about
I agree, we'll go with option 2. I put some info on the wiki concerning current memcache usage, though it is likely to get out of date quickly.
I did a little reading about the app engine implementation of memcache. Looks like the following limits apply:
Also, when I was writing code to update memcache when a pick sheet is created, I didn't spend too much time thinking about race conditions...but memcache has a compare and set algorithm to address that. Need to look into that some more.
What to do when a database put invalidates memcache data?
Obviously, 3. is ridiculous.