learningequality/ka-lite — pull request #913 by bcipolli (2013-11-03 04:33:55+00:00)
Title: Cache invalidation via signals

Depends on #908, addresses #759

In order to localize caching code to a single place, rather than needing to be explicitly added to every location, use Django signals (post_save and post_delete on VideoFile objects).

Now, in order to trigger cache invalidation, create a VideoFile object (to signal a new video), or delete a VideoFile object (to signal a video was removed).

In order to force the signals, `bulk_create` can no longer be called.

Testing:
* Ran caching tests, verified that they (a) broke when the old code was removed, and (b) worked again when the signal listeners were implemented