Skip to content

Commit 121adc2

Browse files
committed
add MessageCache and DomainNode, based on peewee ORM & SQLite
1 parent 82a80c5 commit 121adc2

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
@@ -81,6 +81,7 @@ testing =
8181
flake8
8282
substrate-interface
8383
py-sr25519-bindings
84+
peewee
8485
mqtt =
8586
aiomqtt<=0.1.3
8687
certifi
@@ -106,6 +107,8 @@ ledger =
106107
ledgereth==0.9.0
107108
docs =
108109
sphinxcontrib-plantuml
110+
cache =
111+
peewee
109112

110113
[options.entry_points]
111114
# Add here console scripts like:

src/aleph/sdk/conf.py

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

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

41+
CACHE_DATABASE_PATH: Path = Field(
42+
default=Path(":memory:"), # can also be :memory: for in-memory caching
43+
description="Path to the cache database",
44+
)
45+
CACHE_FILES_PATH: Path = Field(
46+
default=Path("cache", "files"),
47+
description="Path to the cache files",
48+
)
49+
4150
class Config:
4251
env_prefix = "ALEPH_"
4352
case_sensitive = False

0 commit comments

Comments
 (0)