aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
Commit message (Collapse)AuthorAgeFilesLines
...
| * do cachejail search filtering in sqlRobin Appelman2021-01-263-4/+60
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #25659 from nextcloud/smb-getmetadata-catchRoeland Jago Douma2021-03-051-3/+3
|\ \ | | | | | | catch notfound and forbidden exception in smb::getmetadata
| * | catch notfound and forbidden exception in smb::getmetadataRobin Appelman2021-03-041-3/+3
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | | Remove RedundantcastsRoeland Jago Douma2021-03-041-1/+1
|/ / | | | | | | | | | | For #25839 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-184-4/+4
| | | | | | | | | | | | | | | | | | | | 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>
* | move AbstractCacheEvent into OCPRobin Appelman2021-02-151-93/+0
|/ | | | | | otherwise we have concrete cache events in OCP extending non OCP classes Signed-off-by: Robin Appelman <robin@icewind.nl>
* Bump doctrine/dbal from 2.12.0 to 3.0.0Christoph Wurst2021-01-082-10/+13
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* ignore files that have no read permissions during scanningRobin Appelman2021-01-061-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersChristoph Wurst2020-12-301-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #24715 from nextcloud/bug/noid/limit-get-incomplete-to-1Roeland Jago Douma2020-12-211-1/+2
|\ | | | | Limit getIncomplete query to one row
| * Limit getIncomplete query to one rowDaniel Kesselberg2020-12-151-1/+2
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Update all license headers for Nextcloud 21Christoph Wurst2020-12-1611-10/+14
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* code style and dispatchTypedRobin Appelman2020-12-021-2/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* rename cache event to follow new naming standardsRobin Appelman2020-11-261-8/+22
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* extend cache eventsRobin Appelman2020-11-263-5/+27
| | | | | | | | - adds cache remove event - expose storage id in event - emit events during cache move Signed-off-by: Robin Appelman <robin@icewind.nl>
* Empty string is returned as null, but empty string in file cache is the root ↵Joas Schilling2020-11-101-1/+5
| | | | | | and exists Signed-off-by: Joas Schilling <coding@schilljs.com>
* Don't leave cursors open when tests failJoas Schilling2020-11-093-13/+62
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use query builder instead of OC_DB in OC\Files\*Joas Schilling2020-11-092-15/+37
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use Query builder functionJoas Schilling2020-11-061-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix order of GREATEST for OracleJoas Schilling2020-11-061-3/+3
| | | | | | | | | As per https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions060.htm Oracle uses the first value to cast the rest or the values. So when the first value is a plain int, instead of doing the math, it will cast the expression to int and continue with a potential 0. Signed-off-by: Joas Schilling <coding@schilljs.com>
* The file cache entry is array accessibleChristoph Wurst2020-10-131-1/+1
| | | | | | … so let's make this part of our API. We use it as array already. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #22867 from nextcloud/shared-storage-init-lessRoeland Jago Douma2020-09-171-0/+53
|\ | | | | Shared storage optimizations
| * optimize View::getPath if we already know the storage idRobin Appelman2020-09-161-3/+0
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * disable update checking for shared storagesRobin Appelman2020-09-151-0/+56
| | | | | | | | | | | | update checking is already handled by the share source Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Remove @suppress SqlInjectionCheckerMorris Jobke2020-09-162-5/+0
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-242-2/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Make Cache::removeChildren non recursiveRobin Appelman2020-08-202-15/+38
| | | | | | | | | | | | Currently the "add new files during scanning" call stack is smaller than the "remove deleted files during scanning" call stack. This can lead to the scanner adding folders in the folder tree that are to deep to be removed. This changes the `removeChildren` logic to be non recursive so there is no limit to the depth of the folder tree during removal Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use matching parameter names form interfaces and implementationsMorris Jobke2020-08-191-2/+2
| | | | | | Found by Psalm 3.14.1 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* dont update mimetype when moving to trashRobin Appelman2020-07-301-1/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix renameFromStorage messing with folder mimetypeRobin Appelman2020-07-231-7/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* prevent the root storage from accidentally scanning user foldersRobin Appelman2020-06-111-0/+47
| | | | | | | while this scan *should* never be triggered, it's good to have some failsafe to ensure that the users home contents don't end up getting scanned in the root storage Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headers for 19Christoph Wurst2020-04-292-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add method to storage backends to get directory content with metadataRobin Appelman2020-04-201-27/+10
| | | | | | | | | | | | | | | | | Currently you need to use `opendir` and then call `getMetadata` for every file, which adds overhead because most storage backends already get the metadata when doing the `opendir`. While storagebackends can (and do) use caching to relief this problem, this adds cache invalidation dificulties and only a limited number of items are generally cached (to prevent memory usage exploding when scanning large storages) With this new methods storage backends can use the child metadata they got from listing the folder to return metadata without having to keep seperate caches. Signed-off-by: Robin Appelman <robin@icewind.nl>
* Format code according to PSR2Christoph Wurst2020-04-101-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-102-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all properties and move static keywordChristoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-107-9/+0
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-104-16/+16
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-092-1/+1
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* restart transaction when cache insert fails due to duplicateRobin Appelman2020-04-011-3/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* call cache->insert directly instead of going trough cache->put first when ↵Robin Appelman2020-04-011-1/+1
| | | | | | scanning Signed-off-by: Robin Appelman <robin@icewind.nl>
* dont try to get existing cache data during scanning if we already know its a ↵Robin Appelman2020-04-011-4/+4
| | | | | | new file Signed-off-by: Robin Appelman <robin@icewind.nl>
* reuse known parentId when inserting cache entries in scannerRobin Appelman2020-04-012-1/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-318-0/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-267-30/+30
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use lowercase true, false and null constantsChristoph Wurst2020-03-251-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* dont try to update storage mtime if we can't get the mtimeRobin Appelman2020-03-021-6/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow to overwrite the path on the cache eventJoas Schilling2020-02-131-0/+8
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>