diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index 0f8c056139b25f54b859cf95d89bba0ba2a30475..9f996e19f8189315fdcdd6ff31c1a7f091ee51e3 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -203,6 +203,8 @@ class OC_TemplateLayout extends OC_Template {
 		}, $files);
 
 		sort($files);
+		// include the apps' versions hash to invalidate the cached assets
+		$files[]= self::$versionHash;
 		return hash('md5', implode('', $files));
 	}