Return a cache bucket for the given template. All arguments are mandatory but filename may be `None`.
(self, environment, name, filename, source)
| 154 | return sha1(source.encode('utf-8')).hexdigest() |
| 155 | |
| 156 | def get_bucket(self, environment, name, filename, source): |
| 157 | """Return a cache bucket for the given template. All arguments are |
| 158 | mandatory but filename may be `None`. |
| 159 | """ |
| 160 | key = self.get_cache_key(name, filename) |
| 161 | checksum = self.get_source_checksum(source) |
| 162 | bucket = Bucket(environment, key, checksum) |
| 163 | self.load_bytecode(bucket) |
| 164 | return bucket |
| 165 | |
| 166 | def set_bucket(self, bucket): |
| 167 | """Put the bucket into the cache.""" |
no test coverage detected