Browse Source

Update FileCache

Save the polls cache in the /polls/ subdirectory.
Visman 4 years ago
parent
commit
433057e823
1 changed files with 5 additions and 2 deletions
  1. 5 2
      app/Core/Cache/FileCache.php

+ 5 - 2
app/Core/Cache/FileCache.php

@@ -203,8 +203,11 @@ class FileCache implements CacheInterface
         if (! \preg_match('%^[a-z0-9_\.]+$%Di', $key)) {
             throw new InvalidArgumentException('Key is not a legal value');
         }
-
-        return $this->cacheDir . "/cache_{$key}.php";
+        if ('poll' == \substr($key, 0, 4)) {
+            return $this->cacheDir . "/polls/cache_{$key}.php";
+        } else {
+            return $this->cacheDir . "/cache_{$key}.php";
+        }
     }
 
     /**