Skip to content

Commit 2828fe6

Browse files
committed
refactor: use LRU cache for days classmethod
1 parent 9473c28 commit 2828fe6

File tree

1 file changed

+2
-0
lines changed
  • aws_lambda_powertools/utilities/feature_flags

1 file changed

+2
-0
lines changed

aws_lambda_powertools/utilities/feature_flags/schema.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import re
55
from datetime import datetime
66
from enum import Enum
7+
from functools import lru_cache
78
from typing import Any, Dict, List, Optional, Union
89

910
from dateutil import tz
@@ -77,6 +78,7 @@ class TimeValues(Enum):
7778
SATURDAY = "SATURDAY"
7879

7980
@classmethod
81+
@lru_cache(maxsize=1)
8082
def days(cls) -> list[str]:
8183
return [day.value for day in cls if day.value not in ["START", "END", "TIMEZONE"]]
8284

0 commit comments

Comments
 (0)