diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-01-13 10:41:49 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-01-13 10:41:49 +0100 |
commit | f56e05fde0d6d9a768dd436e6534971be87db669 (patch) | |
tree | f8afde0a97db0f2d4efac647436b3201cf1ea7e1 /apps/files_external | |
parent | 47a1fbe248c3c173ce760d69a469c06a019770d8 (diff) | |
parent | aa51fe10951c6505a188d80ad57a81849aa5d58d (diff) | |
download | nextcloud-server-f56e05fde0d6d9a768dd436e6534971be87db669.tar.gz nextcloud-server-f56e05fde0d6d9a768dd436e6534971be87db669.zip |
Merge pull request #21666 from owncloud/smb-statcache-cap-82
[8.2] cap the number of entries we cache in smb's statcache
Diffstat (limited to 'apps/files_external')
-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 64a752960bf..3db25d477dd 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(); } /** |