Commit a0ca53a6 authored by hypsug0's avatar hypsug0
Browse files

feat: Caching autocomplet user API

parent 63331e81
from django.urls import path
from django.views.decorators.cache import cache_page
from .api import ProfileAutocompleteSearch
from .views import (
......@@ -30,7 +31,11 @@ urlpatterns = [
MyProfileDetailExport.as_view(),
name="myprofile_detail_export",
),
path("api/v1/profile/search", ProfileAutocompleteSearch.as_view(), name="profile_search_api"),
path(
"api/v1/profile/search",
cache_page(60 * 15)(ProfileAutocompleteSearch.as_view()),
name="profile_search_api",
),
path("myprofile/update", MyProfileUpdate.as_view(), name="myprofile_update"),
path("list", UserListView.as_view(), name="user_search"),
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment