Skip to content

Commit bbbcc76

Browse files
Rohit KumarRohit Kumar
authored andcommitted
Adding a ttl for an hour
1 parent f3af483 commit bbbcc76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

labs/TrapheusAI/providers/github_provider.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def connect(self, input: str):
2222
return request_headers, request_params
2323

2424

25-
@streamlit.cache_data
25+
@streamlit.cache_data(ttl=3600)
2626
def query(_self, input: str):
2727
request_headers, request_params = _self.connect(input)
2828
response = requests.get(constants.GITHUB_END_POINT + constants.GITHUB_SEARCH_PATH, params=request_params,
@@ -31,7 +31,7 @@ def query(_self, input: str):
3131
response_body = response.json()
3232
return response_body
3333

34-
@streamlit.cache_data
34+
@streamlit.cache_data(ttl=3600)
3535
def extract_data(_self, input: str):
3636
formatted_results = []
3737
data = _self.query(input).get("items", [])

0 commit comments

Comments
 (0)