summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-13 10:33:43 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-13 10:33:43 +0100
commit5565b19382d08df427fbdcf806c2a408a11f7207 (patch)
tree1951e5fa553c9cca9ea61237d270ef18d4a97abd /apps
parenta11f6093b7d51fe96ce0fb712ca2d2015dbc5553 (diff)
parentd8d6368dd70cf01eb6fbdee4ae5224c508da3d1f (diff)
downloadnextcloud-server-5565b19382d08df427fbdcf806c2a408a11f7207.tar.gz
nextcloud-server-5565b19382d08df427fbdcf806c2a408a11f7207.zip
Merge pull request #21648 from owncloud/smb-statcache-cap
cap the number of entries we cache in smb's statcache
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/smb.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php
index 0e61de4654e..9da21dc88e6 100644
--- a/apps/files_external/lib/smb.php
+++ b/apps/files_external/lib/smb.php
@@ -35,6 +35,7 @@ use Icewind\SMB\NativeServer;
use Icewind\SMB\Server;
use Icewind\Streams\CallbackWrapper;
use Icewind\Streams\IteratorDirectory;
+use OC\Cache\CappedMemoryCache;
use OC\Files\Filesystem;
class SMB extends Common {
@@ -49,9 +50,14 @@ class SMB extends Common {
protected $share;
/**
+ * @var string
+ */
+ protected $root;
+
+ /**
* @var \Icewind\SMB\FileInfo[]
*/
- protected $statCache = array();
+ protected $statCache;
public function __construct($params) {
if (isset($params['host']) && isset($params['user']) && isset($params['password']) && isset($params['share'])) {
@@ -72,6 +78,7 @@ class SMB extends Common {
} else {
throw new \Exception('Invalid configuration');
}
+ $this->statCache = new CappedMemoryCache();
}
/**