@@ -0,0 +1,878 @@
+from webassets.filter import Filter%0Afrom webassets.utils import hash_func%0A%0Aclass CacheableJinja2Context():%0A    def __init__(self, context = %7B%7D):%0A        self.context = context%0A%0A    def unique(self):%0A        return self.context%0A%0A    def context(self):%0A        return self.context%0A%0A%0Aclass CacheableJinja2Filter(Filter):%0A    name = 'cacheablejinja2'%0A    max_debug_level = None%0A%0A    def __init__(self, context: CacheableJinja2Context, jinja_env):%0A        super(CacheableJinja2Filter, self).__init__()%0A        self.context = context or CacheableJinja2Context()%0A        self.jinja_env = jinja_env%0A%0A    def id(self):%0A        return hash_func((self.name, self.unique(),))%0A%0A    def unique(self):%0A        return self.context.unique()%0A%0A    def input(self, _in, out, source_path, output_path, **kw):%0A        out.write(self.jinja_env.from_string(_in.read()).render(self.context.context()))%0A%0A

implement a cacheable jinja2 template filter