Skip to content

Commit 26146b7

Browse files
committed
add MessageCache and DomainNode, based on peewee ORM & SQLite
1 parent ec518b5 commit 26146b7

File tree

6 files changed

+1317
-0
lines changed

6 files changed

+1317
-0
lines changed

setup.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ testing =
7979
black
8080
isort
8181
flake8
82+
peewee
8283
mqtt =
8384
aiomqtt<=0.1.3
8485
certifi
@@ -103,6 +104,8 @@ ledger =
103104
ledgereth==0.9.0
104105
docs =
105106
sphinxcontrib-plantuml
107+
cache =
108+
peewee
106109

107110
[options.entry_points]
108111
# Add here console scripts like:

src/aleph/sdk/conf.py

+9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ class Settings(BaseSettings):
3333

3434
CODE_USES_SQUASHFS: bool = which("mksquashfs") is not None # True if command exists
3535

36+
CACHE_DATABASE_PATH: Path = Field(
37+
default=Path(":memory:"), # can also be :memory: for in-memory caching
38+
description="Path to the cache database",
39+
)
40+
CACHE_FILES_PATH: Path = Field(
41+
default=Path("cache", "files"),
42+
description="Path to the cache files",
43+
)
44+
3645
class Config:
3746
env_prefix = "ALEPH_"
3847
case_sensitive = False

0 commit comments

Comments
 (0)