Skip to content

Commit 0a2b7dd

Browse files
committed
Add enum CacheType, returning the string of cache type used.
- Passing in this over a string is preferred as the string names may change, but these won't.
1 parent 50c730d commit 0a2b7dd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

coc/enums.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from enum import Enum
2+
3+
4+
class CacheType(Enum):
5+
search_clans = 'cache_search_clans'
6+
war_clans = 'cache_war_clans'
7+
8+
cache_search_players = 'cache_search_players'
9+
war_players = 'cache_war_players'
10+
11+
current_wars = 'cache_current_wars'
12+
war_logs = 'cache_war_logs'
13+
14+
league_groups = 'cache_league_groups'
15+
league_wars = 'cache_league_wars'
16+
17+
locations = 'cache_locations'
18+
leagues = 'cache_leagues'
19+
seasons = 'cache_seasons'
20+
21+
def __str__(self):
22+
return self.value

0 commit comments

Comments
 (0)