# Copyright (c) 2015, Xhive Global Ltd. and Contributors
# License: MIT. See LICENSE
import xhiveframework
from xhiveframework.model.document import Document


class ClientScript(Document):
	def on_update(self):
		xhiveframework.clear_cache(doctype=self.dt)

	def on_trash(self):
		xhiveframework.clear_cache(doctype=self.dt)
