Skip to content

Commit

Permalink
fix: Don't cache pages with query params (frappe#30881)
Browse files Browse the repository at this point in the history
This was always broken apparantly. Cache key only contains the path so
querystring is being ignored. If request has query params then we
shouldn't cache it.

WIP - better solution for caching based on cache headers. Anyway this
caching isn't THAT helpful since frappe#29170
  • Loading branch information
ankush authored Jan 27, 2025
1 parent 9b79dfe commit 23694b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frappe/website/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def can_cache(no_cache=False):
return False
if getattr(frappe.local, "no_cache", False):
return False
if frappe.request and frappe.request.query_string:
return False
return not no_cache


Expand Down

0 comments on commit 23694b6

Please sign in to comment.