aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Config/UserMountCache.php
Commit message (Collapse)AuthorAgeFilesLines
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix: ensure array returned from getMountsForFileId is continiousRobin Appelman2024-08-021-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: make usermountcache compatible with shardingRobin Appelman2024-07-171-5/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-25/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Revert "don't perform an explicit setup when using the file cache"Joas Schilling2024-03-071-1/+1
|
* Merge pull request #32163 from nextcloud/file-cache-gc-no-full-setupJohn Molakvoæ2024-03-071-1/+1
|\ | | | | don't perform an explicit setup when using the file cache
| * fix: fix user folder initRobin Appelman2024-03-061-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix: clearify logic around getMountsForFileId filteringRobin Appelman2024-03-061-2/+9
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Revert "Filter mounts for file id before trying to get user information"Robin Appelman2024-03-061-16/+4
| | | | | | | | | | | | This reverts commit 1e2cf820c89b774d0a8d6f85bfd8d2fd1b4ab2d6. Signed-off-by: Robin Appelman <robin@icewind.nl>
* | perf: use lazy user in UserMountCache for getting user for cached mountRobin Appelman2024-03-061-6/+4
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* only get the path for the users cached mount info when we use itRobin Appelman2024-02-091-15/+50
| | | | | | most of the time we shouldn't need it so we can save joining on the filecache Signed-off-by: Robin Appelman <robin@icewind.nl>
* optimize UserMountCache::registerStorageRobin Appelman2023-11-161-57/+47
| | | | | Signed-off-by: Robin Appelman <robin@icewind.nl> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* enh(IMountManager): Add method to get MountPoint from CachedMountInfoJonas2023-10-231-1/+1
| | | | Signed-off-by: Jonas <jonas@freesources.org>
* Convert isset ternary to null coalescing operatorHamid Dehnavi2023-09-281-1/+1
| | | | Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
* Refactors "strpos" calls in lib/private to improve code readability.Faraz Samapoor2023-05-151-1/+1
| | | | Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
* allow storing multiple mounts for the same rootid in the mount cacheRobin Appelman2023-04-281-17/+19
| | | | | | | | | | | | currently `[$userId, $rootId]` is used as the unique key for storing mounts in the mount cache, however there are cases where the same rootid is mounted in multiple places for a user which currently leads to not all of those mounts being added to the cache. Previously this didn't matter as the mount cache was only used to list users with access to a specific file, so a user having access to the file multiple times didn' change anything. With 24 the mount cache is used for more cases and multiple mounts for the same id becomes relevant. While I think there isn't a real negative effect atm besides missing the optimized path we should ensure that the mounts are properly listed Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add transaction around mass mounts operationsJoas Schilling2023-03-071-12/+19
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* more filesystem setup performance instrumentationRobin Appelman2023-02-101-1/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix updating cached mounts that didn't have their mount provider set previouslyRobin Appelman2022-08-161-1/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix typos in lib/private subdirectoryluz paz2022-07-271-1/+1
| | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/private` Signed-off-by: luz paz <luzpaz@github.com>
* Move CappedMemoryCache to OCPCarl Schwan2022-07-141-1/+1
| | | | | | | | This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add stricter psalm type for CappedMemoryCacheCarl Schwan2022-05-121-20/+7
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Make the binary operation order explicitJoas Schilling2022-04-211-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #31609 from nextcloud/fix/migrate-away-from-iloggerCôme Chilliet2022-03-291-10/+3
|\ | | | | Migrate from ILogger to LoggerInterface in lib/private
| * Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-10/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | add comment for getMountForPath loopRobin Appelman2022-03-241-0/+2
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix method nameRobin Appelman2022-03-241-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | update cached mounts when only specific providers have been setupRobin Appelman2022-03-241-1/+6
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | allow getting cached mounts by path from the mount cacheRobin Appelman2022-03-241-0/+33
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* store mountprovider for each mount in the mounts tableRobin Appelman2022-02-231-11/+23
| | | | | | this enabled more fine grained filesystem setup Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Filter mounts for file id before trying to get user informationJulius Härtl2021-04-301-4/+16
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-1/+1
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't leave cursors open when tests failJoas Schilling2020-11-091-4/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove @suppress SqlInjectionCheckerMorris Jobke2020-09-161-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for Nextcloud 20 (again)Christoph Wurst2020-09-071-0/+1
| | | | | | | There are still lots of outdated headers, so time for another round of updates. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Transfer shares of the transferred root nodeJulius Härtl2020-08-311-0/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headersChristoph Wurst2019-12-051-1/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* more efficient way to detect added and removed mountsRobin Appelman2018-08-161-9/+23
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* remove double loop for detecting changed mountsRobin Appelman2018-08-161-9/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use the path_hash instead of the path to query the filecacheMorris Jobke2018-07-161-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove unused import statementsMorris Jobke2018-02-141-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #6220 from nextcloud/cached-mount-info-filepathLukas Reschke2017-11-091-2/+15
|\ | | | | Allow getting the filepath when getting cached mounts by fileid
| * Allow getting the filepath when getting cached mounts by fileidRobin Appelman2017-10-271-2/+15
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #6988 from starypatyk/stable12-mount-cache-performanceMorris Jobke2017-11-071-1/+5
|\ \ | | | | | | Improve performance of UserMountCache with external storage folders
| * | Improve performance of UserMountCache with external storage foldersDariusz Olszewski2017-11-011-1/+5
| |/