summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-01-12 13:14:04 +0100
committerRobin Appelman <icewind@owncloud.com>2016-01-12 13:26:58 +0100
commitd8d6368dd70cf01eb6fbdee4ae5224c508da3d1f (patch)
tree297a4c8682923ad96396c8defb53eb6161f82ce8 /apps/files_external/lib
parent0c0829fbc73ce10ea1a951989c20973b6b5faa16 (diff)
downloadnextcloud-server-d8d6368dd70cf01eb6fbdee4ae5224c508da3d1f.tar.gz
nextcloud-server-d8d6368dd70cf01eb6fbdee4ae5224c508da3d1f.zip
cap the number of entries we cache in smb's statcache
Diffstat (limited to 'apps/files_external/lib')
-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 125e0a6dd2c..8b0d63b3e31 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();
}
/**