Skip to content
Snippets Groups Projects
Commit bdee9fe4 authored by Antoine Lambert's avatar Antoine Lambert
Browse files

common/utils: Use cache in origin_visit_types function

That function is used to dynamically retrieve the list of origin visit
types (git, svn, npm, ...) currently supported by Software Heritage.

That list of visit types is then used to populate the visit type
dropdown in the search form available in the home and search pages
of the web application.

However getting that visit types list is costly as it involves sending
an elasticsearch query through the use of swh-search.

So instead of sending that costly query each time a search form must
be rendered, prefer to cache the visit types list and update it
every 24 hours.

That change significantly speedup the homepage rendering of the
web application.
parent b364c93d
No related branches found
No related tags found
1 merge request!933common/utils: Use cache in origin_visit_types function
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment