Skip to content

Commit

Permalink
Merge pull request #98 from Thorfusion/dev
Browse files Browse the repository at this point in the history
remove old cache env that causes crash at startup
  • Loading branch information
maggi373 authored Dec 22, 2024
2 parents bc20d97 + 86e3839 commit b7a4203
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,6 @@
R2_BUCKET = os.getenv("R2_BUCKET")

DB_IS_UP = Database.is_setup()
if os.getenv("CACHE_ALGORITHM"):
cache_algorithm = os.getenv("CACHE_ALGORITHM").upper()
else:
cache_algorithm = "LRU"
print("Invalid cache algorithm, using LRU as default")
if cache_algorithm not in ("FIFO", "LRU", "LFU", "RR"):
print("Invalid cache algorithm, using LRU as default")
cache_algorithm = "LRU"

cache_type = None
if cache_algorithm == "FIFO":
cache_type = FIFOCache
elif cache_algorithm == "LRU":
cache_type = LRUCache
elif cache_algorithm == "LFU":
cache_type = LFUCache
elif cache_algorithm == "RR":
cache_type = RRCache

if (os.getenv("CACHE_SIZE")):
cache_size = int(os.getenv("CACHE_SIZE"))
Expand Down

0 comments on commit b7a4203

Please sign in to comment.