diff --git a/ietf/doc/utils.py b/ietf/doc/utils.py index 9b2570d8ba..a30430829a 100644 --- a/ietf/doc/utils.py +++ b/ietf/doc/utils.py @@ -1046,10 +1046,6 @@ def get_replaces_tree(doc): return sorted(history, key=lambda x: x['published']) -def get_search_cache_key(key_fragment): - return f"doc:document:search:{key_fragment}" - - def build_file_urls(doc: Union[Document, DocHistory]): if doc.type_id == "rfc": base_path = os.path.join(settings.RFC_PATH, doc.name + ".") diff --git a/ietf/doc/views_search.py b/ietf/doc/views_search.py index 7b71dd77bd..0f1937efb3 100644 --- a/ietf/doc/views_search.py +++ b/ietf/doc/views_search.py @@ -65,7 +65,7 @@ IESG_BALLOT_ACTIVE_STATES, IESG_STATCHG_CONFLREV_ACTIVE_STATES, IESG_CHARTER_ACTIVE_STATES ) from ietf.doc.fields import select2_id_doc_name_json -from ietf.doc.utils import get_search_cache_key, augment_events_with_revision, needed_ballot_positions +from ietf.doc.utils import augment_events_with_revision, needed_ballot_positions from ietf.group.models import Group from ietf.idindex.index import active_drafts_index_by_group from ietf.name.models import DocTagName, DocTypeName, StreamName @@ -292,7 +292,7 @@ def search(request): if request.method == "POST": form = SearchForm(data=request.POST) if form.is_valid(): - cache_key = get_search_cache_key(form.cache_key_fragment()) + cache_key = f"doc:document:search:{form.cache_key_fragment()}" cached_val = cache.get(cache_key) if cached_val: [results, meta] = cached_val