ets-berkeley-edu/calcentral — pull request #2059 by chikoon (2014-01-31 01:14:15+00:00)
Title: CLC-3187: LiveUpdates: Do warmup in a forced-cache-write mode

https://jira.media.berkeley.edu/jira/browse/CLC-3187

Do warmup in a forced-cache-write mode, making sure the warmer
forcibly updates what's in the cache without expiring it first.

Requires adjusting my_merged_model's get_feed method and Cacheable's
fetch_from_cache receive a parameter that forces the feed to be
written to the cache during warmups.

The force_cache_write argument is currently only used in the UserCacheWarmer.

Except in this particular case MyMergeModel::get_feed requires no arguments at all.

Additional notes:
- Stopped using the optional :opts argument in my_up_next model's
get_feed_internal because this argument was deprecated in this branch.
- Stopped passing arbitrary :opts to get_feed_internal in my_merged_model.
- Also, stopped expecting arbitrary :opts in my_merged_model's
get_feed_as_json method. :opts is not being used anywhere.
- Added my_merged_model_spec with a test borrowed from UserApi for
checking cache handling with the correct parameters passed to Cacheable
- Added a check in the user_cache_warmer to make sure the force_cache_write
argument is being passed as true when warming up merged feeds.