diff --git a/libraries/cache/.gitignore b/libraries/cache/.gitignore
new file mode 100644
index 0000000000..a68d087bfe
--- /dev/null
+++ b/libraries/cache/.gitignore
@@ -0,0 +1,2 @@
+/*
+!/.gitignore
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 5be43db5ff..a3f2a10055 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -74,6 +74,7 @@
*/node_modules/*
+ */libraries/cache/*
*/test/sami-config.php
*.twig
*/twig-templates/*
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index 544bb6390b..490d8874a5 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -12,6 +12,7 @@ parameters:
excludes_analyse:
- examples/openid.php
- node_modules/*
+ - libraries/cache/*
- test/sami-config.php
- tmp/*
- twig-templates/*
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 1b95f0ee71..db35e32a38 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -25,6 +25,7 @@
examples
node_modules
+ libraries/cache
test
tmp
vendor