orslumen/record-cache — pull request #27 by joshtabak (2013-03-13 03:03:23+00:00)
Title: Allow subclassing

We have cached models that are subclassed. This is sort of a weird pattern, but somebody else out there might be doing the same thing, and this should help them.

If an update happens on the subclassed record, we need to expire the parent's cache.

e.g. There is a User model, that is record-cache enabled. There is also a SpecialUser model defined as follows. There is no caching on SpecialUser.

class SpecialUser < User

Without the changes in this pull request, saves on SpecialUser will not clear the cache for the corresponding record in User, which is a problem.