Skip to content

Commit b6a558a

Browse files
committed
Changing cache location
1 parent a48d730 commit b6a558a

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## 1.2.2 - 2023-12-13
5+
- Changed daohaus names cache folder
6+
47
## 1.2.1 - 2023-12-12
58
- Fixed error that made impossible getting DAOhaus proposals
69

src/common/common.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def solve_decimals(df: pd.DataFrame) -> pd.DataFrame:
3636
class Collector(ABC):
3737
INDEX = ['network', 'id']
3838

39-
def __init__(self, name:str, runner):
39+
def __init__(self, name:str, runner: 'Runner'):
4040
self.name: str = name
4141
self.runner = runner
4242

@@ -112,6 +112,11 @@ def __init__(self, dw: Path = Path()):
112112
def set_dw(self, dw) -> Path:
113113
self.__dw = dw
114114

115+
@property
116+
def cache(self) -> Path:
117+
# Common cache folder for everyone
118+
return self.__dw / '.cache'
119+
115120
@property
116121
def basedir(self) -> Path:
117122
return self.__dw / self.name

src/daohaus/runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def moloch_names(df: pd.DataFrame) -> pd.DataFrame:
5858
if config.skip_daohaus_names:
5959
return df
6060

61-
cached = requests_cache.CachedSession(self.data_path.parent / '.names_cache',
61+
cached = requests_cache.CachedSession(self.runner.cache / 'daohaus_names_cache',
6262
use_cache_dir=False,
6363
expire_after=timedelta(days=30)
6464
)

0 commit comments

Comments
 (0)