Set the input data and delete all the out-dated cache content.
(self, data: Sequence)
| 321 | self.transform_hash = transform_hash.decode("utf-8") |
| 322 | |
| 323 | def set_data(self, data: Sequence): |
| 324 | """ |
| 325 | Set the input data and delete all the out-dated cache content. |
| 326 | |
| 327 | """ |
| 328 | self.data = data |
| 329 | if self.cache_dir is not None and self.cache_dir.exists(): |
| 330 | shutil.rmtree(self.cache_dir, ignore_errors=True) |
| 331 | self.cache_dir.mkdir(parents=True, exist_ok=True) |
| 332 | |
| 333 | def _pre_transform(self, item_transformed): |
| 334 | """ |