Caches variants_dict and replace_dict in a single database hit.

def _caches_dicts(self):
        """
        Caches variants_dict and replace_dict in a single database hit.
        """

        qs = (self.get_query_set() if django.VERSION < (1, 6)
              else self.get_queryset())

        variants_dict = self._get_variants_dict(qs)
        cache.set(VARIANTS_DICT_CACHE_KEY, variants_dict)

        replace_dict = self._get_replace_dict(qs)
        cache.set(REPLACE_DICT_CACHE_KEY, replace_dict)

        return variants_dict, replace_dict