def METHOD_NAME(self, *args, **kwargs):
    request = get_current_request()
    disable_cache = (request and 'theme' in request.session)
    if not disable_cache:
        return super(CachedLoader, self).METHOD_NAME(*args, **kwargs)
    # django.template.loaders.cached.Loader calls super().get_template()
    # (where super is django.template.loaders.base.Loader) to get templates
    # that are not in the cache.  To skip the cache, we do the same, except
    # we must call django.template.loaders.base.Loader directly instead of
    # using super() since super is django.template.loaders.cached.Loader in
    # this case.
    return DjangoLoader.METHOD_NAME(self, *args, **kwargs)