mirror of
https://github.com/markqvist/Sideband.git
synced 2025-08-15 09:45:34 -04:00
Added map cache control
This commit is contained in:
parent
5110ef3b37
commit
a1aa0544b3
3 changed files with 66 additions and 2 deletions
|
@ -348,6 +348,19 @@ class SidebandCore():
|
|||
|
||||
self.__save_config()
|
||||
|
||||
def clear_map_cache(self):
|
||||
for entry in os.scandir(self.map_cache):
|
||||
os.unlink(entry.path)
|
||||
|
||||
def get_map_cache_size(self):
|
||||
total = 0
|
||||
for entry in os.scandir(self.map_cache):
|
||||
if entry.is_dir(follow_symlinks=False):
|
||||
pass
|
||||
else:
|
||||
total += entry.stat(follow_symlinks=False).st_size
|
||||
return total
|
||||
|
||||
def should_persist_data(self):
|
||||
if self.reticulum != None:
|
||||
self.reticulum._should_persist_data()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue