diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-01-12 13:14:04 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-12 18:12:40 +0100 |
commit | 2e5e756913ffcc62ada6303e6d85dc0192a51eba (patch) | |
tree | f5768ffc6f95abf01d4b25a024e1b4858ff7ae3e /apps | |
parent | 47a2c3738cff363a477fcef011a838f3f05fec2e (diff) | |
download | nextcloud-server-2e5e756913ffcc62ada6303e6d85dc0192a51eba.tar.gz nextcloud-server-2e5e756913ffcc62ada6303e6d85dc0192a51eba.zip |
cap the number of entries we cache in smb's statcache
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/smb.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_external/lib/smb.php b/apps/files_external/lib/smb.php index f58cd9849f2..f0052c817ce 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(); } /** |