Index: modules/notificationserver/manifests/init.pp
diff --git a/modules/notificationserver/manifests/init.pp b/modules/notificationserver/manifests/init.pp
index 1d7eaf21f3a8602783bf6a8078647c6cd5a6cfa6..235d64a2cb80569b1eb5ed20da5be536d707676f 100644
--- a/modules/notificationserver/manifests/init.pp
+++ b/modules/notificationserver/manifests/init.pp
@@ -16,6 +16,25 @@ class notificationserver($is_default = false) {
     onlyif => 'test ! -d /opt/notifications'
   }
 
+  # http://hub.eyeo.com/issues/3927
+  $clear_cache = "find /var/cache/nginx/notification -type f -exec rm -rf {} +"
+
+  # https://linux.die.net/man/5/sudoers
+  file {"/etc/sudoers.d/notification-cache":
+    content => "nginx ALL=(www-data) NOPASSWD:/usr/bin/$clear_cache\n",
+    ensure => 'present',
+    group => 'root',
+    mode => '0440',
+    owner => 'root',
+  }
+
+  # https://docs.puppet.com/puppet/latest/types/augeas.html
+  augeas {"files/opt/notifications/.hg/hgrc/hooks/cache":
+    changes => ["set hooks/changegroup.cache 'sudo -u www-data $clear_cache'"],
+    incl => '/opt/notifications/.hg/hgrc',
+    lens => "Puppet.lns",
+  }
+
   cron {'update_notifications':
     command => 'hg pull -q -u -R /opt/notifications',
     environment => hiera('cron::environment', []),
