Commits

Sebastian Sdorra committed 51b1ab7

clear ui cache when backend changes

  • Participants
  • Parent commits 9f50c9c

Comments (0)

Files changed (1)

File scm-plugin-backend/src/main/java/sonia/scm/plugin/rest/CachedViewableResource.java

  * @author Sebastian Sdorra
  */
 public class CachedViewableResource extends ViewableResource
-        implements PluginBackendListener
+  implements PluginBackendListener
 {
 
   /** the logger for CachedViewableResource */
    * @param cacheName
    */
   public CachedViewableResource(ServletContext context, PluginBackend backend,
-                                BackendConfiguration configuration,
-                                CacheManager cacheManager, String cacheName)
+    BackendConfiguration configuration, CacheManager cacheManager,
+    String cacheName)
   {
     super(context, configuration);
     this.cacheName = cacheName;
     this.cache = cacheManager.getCache(cacheName);
+
+    // register backend listener
+    backend.addListener(this);
   }
 
   //~--- methods --------------------------------------------------------------