# Copyright (c) 2015, JINGROW and Contributors
# License: MIT. See LICENSE

# License: MIT. See LICENSE

import jingrow
from jingrow.model.page import Page


class WebsiteScript(Page):
	# begin: auto-generated types
	# This code is auto-generated. Do not modify anything in this block.

	from typing import TYPE_CHECKING

	if TYPE_CHECKING:
		from jingrow.types import DF

		javascript: DF.Code | None

	# end: auto-generated types
	def on_update(self):
		"""clear cache"""
		jingrow.clear_cache(user="Guest")

		from jingrow.website.utils import clear_cache

		clear_cache()
