From 0bd0cf85b101d5c60e91a06f5c8f65eaaf72d635 Mon Sep 17 00:00:00 2001
From: Benaka Moorthi <benaka.moorthi@gmail.com>
Date: Sat, 21 Sep 2013 21:00:56 -0400
Subject: [PATCH] Attempt to get tests to pass w/ opcache enabled.

---
 core/CacheFile.php | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/core/CacheFile.php b/core/CacheFile.php
index 4666ee69a1..9ae391bd77 100644
--- a/core/CacheFile.php
+++ b/core/CacheFile.php
@@ -143,6 +143,9 @@ class CacheFile
                     @unlink($tmp_filename);
                 }
             }
+
+            $this->opCacheInvalidate($id);
+
             return true;
         }
         return false;
@@ -164,6 +167,7 @@ class CacheFile
         $filename = $this->cachePath . $id . '.php';
         if (file_exists($filename)) {
             @unlink($filename);
+            $this->opCacheInvalidate($filename);
             return true;
         }
         return false;
@@ -176,4 +180,11 @@ class CacheFile
     {
         Filesystem::unlinkRecursive($this->cachePath, $deleteRootToo = false);
     }
-}
+
+    private function opCacheInvalidate($filepath)
+    {
+        if (function_exists('opcache_invalidate')) {
+            opcache_invalidate($filepath);
+        }
+    }
+}
\ No newline at end of file
-- 
GitLab