code: def test_caching(self):
      changed = False
  
      class TestLoader(loaders.BaseLoader):
          def get_source(self, environment, template):
              return "foo", None, lambda: not changed
  
      env = Environment(loader=TestLoader(), cache_size=-1)
      tmpl = env.get_template("template")
      assert tmpl is env.get_template("template")
      changed = True
      assert tmpl is not env.get_template("template")
      changed = False
  
imports: import os
  import shutil
  import sys
  import tempfile
  import time
  import weakref
  import pytest
  from jinja2 import Environment
  from jinja2 import loaders
  from jinja2._compat import PY2
  from jinja2._compat import PYPY
  from jinja2.exceptions import TemplateNotFound
  from jinja2.loaders import split_template_path
  import yatest.common
label_desc: Use image node_id 7 for calling the TestLoaders obj's underlying member method code with example usage: obj.test_caching() and returns: str,  None,  function