codenoble / cache-crispies

Speedy Rails JSON serialization with built-in caching
MIT License
156 stars 14 forks source link

Cache key busting for included/inherited code #1

Closed adamcrown closed 4 years ago

adamcrown commented 5 years ago

It's probably easiest to include a version constant in the serializers. In general, we shouldn't need to version the serializers since all the serializers and nested serializers include an MD5 sum of their contents in the cache key. But if they were to inherit or include code from a separate file, changes to those file's wouldn't be reflected in the cache key. So we probably need some method to manually bust those keys.