From: Lakin Wecker Date: Thu, 10 Jan 2008 18:10:03 +0000 (-0700) Subject: Ticket #292 - Allow the results of subclasses of the PythonTranslator to be cached... X-Git-Tag: 2.0rc1~218^2~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cceba715d42bfe4f9c4b2b915c42c8814ab86ffb;p=jinja2.git Ticket #292 - Allow the results of subclasses of the PythonTranslator to be cached as well. --HG-- branch : trunk --- diff --git a/jinja/loaders.py b/jinja/loaders.py index e3dccde..4b4937a 100644 --- a/jinja/loaders.py +++ b/jinja/loaders.py @@ -239,7 +239,7 @@ class CachedLoaderMixin(object): try: # caching is only possible for the python translator. skip # all other translators - if translator is not PythonTranslator: + if isinstance(translator, PythonTranslator): return super(CachedLoaderMixin, self).load( environment, name, translator) @@ -363,7 +363,7 @@ class MemcachedLoaderMixin(object): try: # caching is only possible for the python translator. skip # all other translators - if translator is not PythonTranslator: + if isinstance(translator, PythonTranslator): return super(MemcachedLoaderMixin, self).load( environment, name, translator) tmpl = None