@receiver(post_compress)
def update_angular_template_hash(sender, **kwargs):
 context = kwargs['context']
 compressed = context['compressed']
 compressed_name = compressed['name']
 if (compressed_name == 'angular_template_cache_preloads'):
  cache = caches['default']
  theme = context['THEME']
  key = make_template_fragment_key('angular', ['template_cache_preloads', theme])
  if cache.get(key):
   cache.delete(key)

@ receiver ( post_compress ) def update_angular_template_hash ( sender , ** kwargs ) : context = kwargs [ 'context' ] compressed = context [ 'compressed' ] compressed_name = compressed [ 'name' ] if ( compressed_name == 'angular_template_cache_preloads' ) : cache = caches [ 'default' ] theme = context [ 'THEME' ] key = make_template_fragment_key ( 'angular' , [ 'template_cache_preloads' , theme ] ) if cache . get ( key ) : cache . delete ( key )
listen for compress events .