diff options
author | Michael Manfre | 2022-12-06 00:23:07 -0500 |
---|---|---|
committer | GitHub | 2022-12-05 22:23:07 -0700 |
commit | b8460b0acd3e833b9ec302d9fa3fb6ab28032c0e (patch) | |
tree | 780d8d9d818447e591ea326c4f3fd809608ff73a /users | |
parent | b0929214d5c4f6df743256cacfb04337b9319aa4 (diff) | |
download | takahe-b8460b0acd3e833b9ec302d9fa3fb6ab28032c0e.tar.gz takahe-b8460b0acd3e833b9ec302d9fa3fb6ab28032c0e.tar.bz2 takahe-b8460b0acd3e833b9ec302d9fa3fb6ab28032c0e.zip |
Only cache unauthenticated page views (#117)
Diffstat (limited to 'users')
-rw-r--r-- | users/views/identity.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/users/views/identity.py b/users/views/identity.py index 4996ad7..4ca230a 100644 --- a/users/views/identity.py +++ b/users/views/identity.py @@ -10,7 +10,7 @@ from django.utils.decorators import method_decorator from django.views.generic import FormView, ListView, TemplateView, View from activities.models import Post, PostInteraction -from core.decorators import per_identity_cache_page +from core.decorators import cache_page, cache_page_by_ap_json from core.ld import canonicalise from core.models import Config from users.decorators import identity_required @@ -18,7 +18,7 @@ from users.models import Domain, Follow, FollowStates, Identity, IdentityStates from users.shortcuts import by_handle_or_404 -@method_decorator(per_identity_cache_page(), name="dispatch") +@method_decorator(cache_page_by_ap_json(public_only=True), name="dispatch") class ViewIdentity(ListView): """ Shows identity profile pages, and also acts as the Actor endpoint when @@ -88,7 +88,7 @@ class ViewIdentity(ListView): @method_decorator( - per_identity_cache_page("cache_timeout_identity_feed"), name="__call__" + cache_page("cache_timeout_identity_feed", public_only=True), name="__call__" ) class IdentityFeed(Feed): """ |