(self)
| 171 | |
| 172 | @hook(AFTER_UPDATE) # type: ignore[misc] |
| 173 | def clear_environment_cache(self) -> None: |
| 174 | # TODO: this could rebuild the cache itself (using an async task) |
| 175 | environment_cache.delete_many( |
| 176 | [self.initial_value("api_key"), *[eak.key for eak in self.api_keys.all()]] |
| 177 | ) |
| 178 | |
| 179 | @hook(AFTER_UPDATE, when="api_key", has_changed=True) # type: ignore[misc] |
| 180 | def update_environment_document_cache(self) -> None: |