[ci skip] Merge pull request #5651 from pawelkg/develop

Test if cache file is writable before unlink it
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php
index 4f38303..021c262 100644
--- a/system/libraries/Cache/drivers/Cache_file.php
+++ b/system/libraries/Cache/drivers/Cache_file.php
@@ -276,7 +276,7 @@
 
 		if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
 		{
-			unlink($this->_cache_path.$id);
+			file_exists($this->_cache_path.$id) && unlink($this->_cache_path.$id);
 			return FALSE;
 		}