Skip to content

Commit

Permalink
Adding a ttl for an hour
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Kumar authored and Rohit Kumar committed Nov 4, 2023
1 parent f3af483 commit bbbcc76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labs/TrapheusAI/providers/github_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def connect(self, input: str):
return request_headers, request_params


@streamlit.cache_data
@streamlit.cache_data(ttl=3600)
def query(_self, input: str):
request_headers, request_params = _self.connect(input)
response = requests.get(constants.GITHUB_END_POINT + constants.GITHUB_SEARCH_PATH, params=request_params,
Expand All @@ -31,7 +31,7 @@ def query(_self, input: str):
response_body = response.json()
return response_body

@streamlit.cache_data
@streamlit.cache_data(ttl=3600)
def extract_data(_self, input: str):
formatted_results = []
data = _self.query(input).get("items", [])
Expand Down

0 comments on commit bbbcc76

Please sign in to comment.