Skip to content

Commit ee2a48e

Browse files
committed
BugFix: set_cache() was overriding the instance attribute rather than the class attribute.
1 parent a5bbe2a commit ee2a48e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

coc/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ class Client:
9696
9797
"""
9898
cache_search_clans = Cache()
99-
10099
cache_war_clans = Cache()
101100

102101
cache_search_players = Cache()
@@ -227,7 +226,7 @@ def set_cache(self, *cache_to_edit, max_size=128, ttl=None):
227226
cache = Cache(max_size=max_size, ttl=ttl)
228227
log.debug('Cache type %s has been set with max size %s and expiry %s seconds',
229228
cache_type, max_size, ttl)
230-
setattr(self, cache_type, cache)
229+
setattr(Client, cache_type, cache)
231230

232231
async def search_clans(self, *, name: str=None, war_frequency: str=None,
233232
location_id: int = None, min_members: int=None, max_members: int=None,

0 commit comments

Comments
 (0)