1
0
mirror of https://github.com/ltcptgeneral/cs239-caching.git synced 2025-10-08 22:00:19 +00:00

[ADD] - Added social media user profile get and upsert microservice with nosql database integration

This commit is contained in:
PurvaG1700
2025-02-17 11:03:02 -08:00
parent 67bf966a6a
commit 12de833f66
12 changed files with 186 additions and 3 deletions

15
app/config.py Normal file

@@ -0,0 +1,15 @@
import os
import yaml
CONFIG_FILE = "config.yaml"
def load_config():
with open(CONFIG_FILE, "r") as f:
return yaml.safe_load(f)
config = load_config()
# Read from environment variable or fallback to YAML value
CACHE_STRATEGY = os.getenv("CACHE_STRATEGY", config.get("cache_strategy", "Baseline"))
CACHE_LIMIT = config.get("cache_limit", 10)
L2_CACHE_LIMIT = config.get("l2_cache_limit", 100)