aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
Commit message (Collapse)AuthorAgeFilesLines
...
* Update license headers for 18Christoph Wurst2019-12-201-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #18314 from nextcloud/fixFileIdSearchRoeland Jago Douma2019-12-101-0/+2
|\ | | | | Fix ambigious fileID on search
| * fix https://github.com/nextcloud/server/issues/18313tobiasKaminsky2019-12-101-0/+2
| | | | | | | | Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
* | Fix search limit to homeRoeland Jago Douma2019-12-091-0/+4
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Update license headersChristoph Wurst2019-12-0519-23/+42
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #17941 from nextcloud/search-by-ownerRoeland Jago Douma2019-12-052-3/+10
|\ \ | |/ |/| Allow filtering the search results to the users home storage
| * remove old 'owner' filterRobin Appelman2019-12-031-5/+0
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * Allow filtering the search results to the users home storageRobin Appelman2019-12-032-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by adding a ```xml <d:eq> <d:prop> <oc:owner-id/> </d:prop> <d:literal>$userId</d:literal> </d:eq> ``` clause to the search query. Searching by `owner-id` can only be done with the current user id and the comparison can not be inside a `<d:not>` or `<d:or>` statement Signed-off-by: Robin Appelman <robin@icewind.nl>
* | dont set folder size to negative values during propagationRobin Appelman2019-11-261-2/+5
|/ | | | | | | | | | normally this shouldn't be a problem, but cache/storage desync might cause this so this adds some failsafe to ensure we dont corrupt the cache further the minimum value is set to -1 instead of 0 in order to triger a background scan on the folder and figure out the size properly Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #18079 from nextcloud/fixes/phpcsRoeland Jago Douma2019-11-253-4/+4
|\ | | | | Some php-cs fixes
| * Some php-cs fixesRoeland Jago Douma2019-11-223-4/+4
| | | | | | | | | | | | | | | | | | | | | | * 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>
* | Harden watcherRoeland Jago Douma2019-11-221-2/+2
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix cache movesRoeland Jago Douma2019-11-181-1/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* filter out empty filecache extension valuesRobin Appelman2019-11-131-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix folder deleteRobin Appelman2019-11-131-3/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* dont create empty filecache extended rowsRobin Appelman2019-11-131-19/+33
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* store filecache extension fieldsRobin Appelman2019-11-133-27/+110
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move more cache logic to querybuilderRobin Appelman2019-11-132-169/+254
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix DAV mimetype searchRoeland Jago Douma2019-10-281-4/+7
| | | | | | | | | Fixes #15048 Catches the case where a full mimetype is sumbitted in the where like clause. Before we didn't catch this and it was just forwarded as is causing invalid queries. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* use OCP\EventDispatcher\Event over Symfony's deprecated EventArthur Schiwon2019-10-171-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* use eq instead of in for loading single storageRobin Appelman2019-09-261-1/+9
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* log which storage id can't be insertedRobin Appelman2019-09-261-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* set a storage availability delay on auth issues to avoid lock outArthur Schiwon2019-08-221-2/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Properly return an int in the getId function of the cacheRoeland Jago Douma2019-08-071-1/+1
| | | | | | fixes #16684 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove deprecated searchByTagRoeland Jago Douma2019-07-264-74/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* remove extra param in cache update callRobin Appelman2019-05-071-2/+2
| | | | | | param was leftover from earlier iterations of the "update event" Signed-off-by: Robin Appelman <robin@icewind.nl>
* Avoid calculating folder size for parent that needs scan.Ari Selseng2019-03-064-8/+32
| | | | Signed-off-by: Ari Selseng <ari@selseng.net>
* add event for cache updateRobin Appelman2019-02-182-1/+75
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add event for inserting cache entriesRobin Appelman2019-02-072-10/+18
| | | | | | | | this provides a reliable way for apps to listen to new files without the need to of cache wrappers to hook into inserts themselves (something which isn't 100% reliable) Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #12865 from nextcloud/fix/do_not_propogate_in_appdataMorris Jobke2018-12-061-3/+12
|\ | | | | No need to propogate changes in appdata
| * No need to propogate changes in appdataRoeland Jago Douma2018-12-051-3/+12
| | | | | | | | | | | | | | | | Right now we propogate a lof of changes in appdata. So for example we propogate each and every preview that is added to the system. This has no real added value as far as I can tell. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Only execute query in propagateChange onceRoeland Jago Douma2018-12-051-2/+2
|/ | | | | | | The second execute statement should be inside the if block. Else it gets executed twice which makes no sense. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* return the correct value when trying to get a non existing item from cache by idRobin Appelman2018-11-161-0/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #11942 from nextcloud/techdebt/noid/use-count-functionMorris Jobke2018-11-121-4/+4
|\ | | | | Use the defined func()->count() instead of manual counting
| * Use the defined func()->count() instead of manual countingJoas Schilling2018-11-081-4/+4
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix UniqueConstraintViolationException while insert into oc_filecacheMorris Jobke2018-11-121-7/+18
|/ | | | | | | | * fixes #6160 by not being prone to the race condition in insertIfNotExists * fixes #12228 by not using a query that can result in a deadlock * replaces the insertIfNotExists call with an insert which is wrapped into a try-catch block Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly search the root of a shared external storageRoeland Jago Douma2018-11-051-1/+1
| | | | | | | | | | | Fixes #1020 When an external storage is shared with you in full the root is '' (empty). This adds an extra check for an empty jail basically. Because if the jail is on the empty string. It matches all paths. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* pass `Cache::getMoveInfo` along cache wrappersRobin Appelman2018-10-171-0/+6
| | | | | | fixes cross storage move in some cases Signed-off-by: Robin Appelman <robin@icewind.nl>
* cleanup locks in scanner on errorRobin Appelman2018-05-041-9/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* move log constants to ILoggerArthur Schiwon2018-04-261-2/+3
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* CacheJail should apply limit and offset after searchingRoeland Jago Douma2018-02-071-2/+9
| | | | | | Else the results might not be correct. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not try to get the jailed path if we can't find the idRoeland Jago Douma2018-02-031-0/+4
| | | | | | | | | Fixes #8047 If we can't find the file by id there we should just return null instead of trying to get the jailed path of null. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Use ::class statement instead of stringMorris Jobke2018-01-291-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-263-4/+4
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #8058 from nextcloud/useless-returnRoeland Jago Douma2018-01-261-7/+0
|\ | | | | Remove useless return statements
| * Remove useless return statementsMorris Jobke2018-01-251-7/+0
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use proper code flow instead of not needed else branchMorris Jobke2018-01-251-2/+1
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Properly log the full exception instead of only the messageMorris Jobke2018-01-231-1/+5
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Support arbitrary number of arguments for d:or and d:and in search queriesRobin Appelman2018-01-161-2/+12
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Remove deprecated \OCP\ConfigRoeland Jago Douma2018-01-131-1/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>