Conditions | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | # coding: utf-8 |
||
28 | def commit(self): |
||
29 | # We import this here to avoid a circular import issue. |
||
30 | from .utils import _invalidate_tables |
||
31 | |||
32 | if self: |
||
33 | self.parent_cache.set_many( |
||
34 | self, cachalot_settings.CACHALOT_TIMEOUT) |
||
35 | # The previous `set_many` is not enough. The parent cache needs to be |
||
36 | # invalidated in case another transaction occurred in the meantime. |
||
37 | _invalidate_tables(self.parent_cache, self.db_alias, |
||
38 | self.to_be_invalidated) |
||
39 |