ets-berkeley-edu/calcentral — pull request #3076 by raydavis (2014-10-13 21:09:59+00:00)
Title: CLC-4102 Reduce (& do not encourage) redundant caching

Meet the new PR, almost the same as the old PR: https://github.com/ets-berkeley-edu/calcentral/pull/3071

The additional commit makes it possible to drop smart-exception-exception handling into a vanilla CachedFeed as easily as into a Live Updates feed. (Like the HttpRequester module, this sets us up to eliminate the unnecessary conflict between BaseProxy vs. UserSpecificModel class hierarchies. I won't have a sample PR ready before my vacation, but on a working branch I've started by collapsing the MyCal1card code into a single class.)

Either CachedFeed or LiveUpdatesEnabled needs to be included as a base module before add-ons are included, but the order of the add-ons shouldn't matter. Sorry, but that's the best I've got without venturing into meta-ugliness like a "getBaseModuleOfTheFeed" method. If it's unacceptable, then so far as I can see we either maintain one huge everything-for-everyone module or we wait for a unified class hierarchy.

https://jira.ets.berkeley.edu/jira/browse/CLC-4102

* Gets rid of some excess caching and excess cache-updating. Now that the service has scaled up so much, we need to reduce memory, CPU, and data-source consumption as much as we can.
* Makes it easier (I hope) to add cache-consuming features one step at a time as needed (CachedFeed + LiveUpdatesEnabled + JsonCacher + FreshenOnWarm), rather than giving away the store by default.
* Also makes it much easier to combine Live Updates checking with normal cache lifespans (including short lifespans when a data source suffers a temporary glitch) via the LiveUpdatingProxy mix-in.

This is massive, obviously, and I won't be surprised if the remaining team considers it too risky for the current short-handed sprint. But we can at least start collecting comments, etc.