Skip to content

Commit 00be165

Browse files
committed
Fix caching
1 parent b95eb80 commit 00be165

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

flask_phpbb3/extension.py

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,26 +124,42 @@ def _backend(self):
124124

125125
def get_autologin(self, key, cache=False, cache_ttl=None):
126126
# type: (str, bool, typing.Optional[int]) -> typing.Optional[dict]
127-
output = self._backend.execute('get_autologin', key=key)\
128-
# type: typing.Optional[dict]
127+
output = self._backend.execute(
128+
'get_autologin',
129+
key=key,
130+
cache=cache,
131+
cache_ttl=cache_ttl,
132+
) # type: typing.Optional[dict]
129133
return output
130134

131135
def get_session(self, session_id, cache=False, cache_ttl=None):
132136
# type: (str, bool, typing.Optional[int]) -> typing.Optional[dict]
133-
output = self._backend.execute('get_session', session_id=session_id)\
134-
# type: typing.Optional[dict]
137+
output = self._backend.execute(
138+
'get_session',
139+
session_id=session_id,
140+
cache=cache,
141+
cache_ttl=cache_ttl,
142+
) # type: typing.Optional[dict]
135143
return output
136144

137145
def get_user(self, user_id, cache=False, cache_ttl=None):
138146
# type: (int, bool, typing.Optional[int]) -> typing.Optional[dict]
139-
output = self._backend.execute('get_user', user_id=user_id)\
140-
# type: typing.Optional[dict]
147+
output = self._backend.execute(
148+
'get_user',
149+
user_id=user_id,
150+
cache=cache,
151+
cache_ttl=cache_ttl,
152+
) # type: typing.Optional[dict]
141153
return output
142154

143155
def get_user_profile(self, user_id, cache=False, cache_ttl=None):
144156
# type: (int, bool, typing.Optional[int]) -> typing.Optional[dict]
145-
output = self._backend.execute('get_user_profile', user_id=user_id)\
146-
# type: typing.Optional[dict]
157+
output = self._backend.execute(
158+
'get_user_profile',
159+
user_id=user_id,
160+
cache=cache,
161+
cache_ttl=cache_ttl,
162+
) # type: typing.Optional[dict]
147163
return output
148164

149165
def has_membership(

0 commit comments

Comments
 (0)