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:
15
app/config.py
Normal file
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)
|
Reference in New Issue
Block a user