diff --git a/src/utils/jira.py b/src/utils/jira.py index fc9d393..c1c0a67 100644 --- a/src/utils/jira.py +++ b/src/utils/jira.py @@ -1,11 +1,17 @@ import dogpile.cache import jira -cache = dogpile.cache.make_region().configure( - "dogpile.cache.dbm", - expiration_time=7200, - arguments={"filename": "jira.cache"}, -) +if os.environ.get("PRIORITIZE_CACHE"): + cache_args = ("dogpile.cache.dbm",) + cache_kwargs = dict( + expiration_time=7200, + arguments={"filename": "jira.cache"}, + ) +else: + cache_args = ("dogpile.cache.null",) + cache_kwargs = {} + +cache = dogpile.cache.make_region().configure(*cache_args, **cache_kwargs) def get_issues(