Persist the session to the storage If its set to autosave, then the entire session will be saved regardless of if save() has been called. Otherwise, just the accessed time will be updated if save() was not called, or the session will be saved if save() was ca
(self)
| 594 | self._session().delete() |
| 595 | |
| 596 | def persist(self): |
| 597 | """Persist the session to the storage |
| 598 | |
| 599 | If its set to autosave, then the entire session will be saved |
| 600 | regardless of if save() has been called. Otherwise, just the |
| 601 | accessed time will be updated if save() was not called, or |
| 602 | the session will be saved if save() was called. |
| 603 | |
| 604 | """ |
| 605 | if self.__dict__['_params'].get('auto'): |
| 606 | self._session().save() |
| 607 | else: |
| 608 | if self.__dict__.get('_dirty'): |
| 609 | self._session().save() |
| 610 | else: |
| 611 | self._session().save(accessed_only=True) |
| 612 | |
| 613 | def dirty(self): |
| 614 | return self.__dict__.get('_dirty', False) |
no test coverage detected