add clearing cache

when structure or global data or template is changed