(self)
| 71 | self._write_cache() |
| 72 | |
| 73 | def _write_cache(self): |
| 74 | try: |
| 75 | with open(self.__cache_file, 'w') as f: |
| 76 | json.dump(self._cache, f, cls=CacheEncoder) |
| 77 | except Exception: |
| 78 | # Failing to write the cache isn't a big enough error to crash on |
| 79 | pass |
| 80 | |
| 81 | def invalidate_cache(self): |
| 82 | self.__init_cache(refresh=True) |
no outgoing calls
no test coverage detected