def cache_relationships(self, cache_super=True, cache_sub=True):
relationships_to_cache = compress(<EOL>['<STR_LIT>', '<STR_LIT>'], [cache_super, cache_sub])<EOL>return self.prefetch_related(*relationships_to_cache)<EOL>
Caches the super and sub relationships by doing a prefetch_related.