Skip to content

Commit 1a7a908

Browse files
committed
Merge branch 'master' of https://github.com/pratikb64/wiki into fix-sidebar-bugs
2 parents 0b3f14f + 4a806bd commit 1a7a908

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

wiki/wiki/doctype/wiki_page/wiki_page.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,10 @@ def get_context(self, context):
208208
wiki_space = (
209209
frappe.get_cached_doc("Wiki Space", wiki_space_name) if wiki_space_name else frappe._dict()
210210
)
211-
212-
context.no_cache = 0 # Changes will invalidate HTML cache
211+
# Do not cache in developer mode
212+
context.no_cache = (
213+
frappe.local.conf.developer_mode or frappe.local.dev_server
214+
) # Changes will invalidate HTML cache
213215
context.navbar_search = wiki_settings.add_search_bar
214216
context.light_mode_logo = wiki_space.light_mode_logo or wiki_settings.logo
215217
context.dark_mode_logo = wiki_space.dark_mode_logo or wiki_settings.dark_mode_logo

0 commit comments

Comments
 (0)