Commit Graph

36 Commits (jtr/fix-public-exceptions-http-codes)

Author SHA1 Message Date
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
Robin Appelman 20dbb6c7e8 feat: add negative compare-and-delete to imemcache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-20 19:34:28 +07:00
Robin Appelman cae0a8218d
chore: remove Redis::DEFAULT_TTL constant now that it's defined in the interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-08-07 19:41:44 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Andrew Summers c0f12d7691 Refactor `OC\Server::getGetRedisFactory`
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:11:40 +07:00
Robin Appelman cc3c7c24a1 set a default and max ttl for redis keys
having infinite TTL can lead to leaked keys as the prefix changes with version upgrades

Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-23 15:41:51 +07:00
Robin Appelman ff62154a79 adjust redis compareSetTTL to use a lua script
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-12-21 15:14:27 +07:00
Robin Appelman 7394645eb7 restore shared lock ttl when releasing
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-12-21 15:14:27 +07:00
Varun Patil c6cee282b3 redis: move lua scripts to class and add type hints
Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2023-05-10 17:37:02 +07:00
Varun Patil 39e805fffa redis: use atomic operations everywhere
This removes a lot of acrobatics in the code and does each operation
atomically using a lua script. This also reduces several round trips
to the server, and the scripts are compiled and cached server-side.

Notably, since all operations work only on a single key (except clear,
which is broken anyway and shouldn't be used), they will continue to
function and be atomic for Redis cluster.

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
2023-04-16 14:38:56 +07:00
Git'Fellow c81ea3aa98
Fix RedisCluster
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-03-22 17:19:07 +07:00
Git'Fellow fab390f884
Move from DEL to UNLINK
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2023-03-22 17:10:05 +07:00
Julius Härtl 023b80e617
Only setup redis connection if needed
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-11-22 09:26:24 +07:00
Côme Chilliet 826e234ecf
Correctly handle Redis::keys returning false
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-09-29 14:41:53 +07:00
Carl Schwan 7d272c54d0 Add a built-in profiler inside Nextcloud
The webui is provided by a seperate application named profiler

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-04 10:28:26 +07:00
Carl Schwan 52760a95d9
Check if directoy is writable instead of possibly missing file
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-12-20 15:36:52 +07:00
Joas Schilling 168c673755
Allow to log DB, redis and LDAP requests into files
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-01 22:33:41 +07:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Arthur Schiwon 9f5480eef4
ensure redis returns bool for hasKey
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-04-13 23:07:54 +07:00
Roeland Jago Douma 4f0fae8f00
Actually set the TTL on redis set
Else well the keys remain for ever and ever.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-12-21 13:33:16 +07:00
Christoph Wurst cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Christoph Wurst 1584c9ae9c
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +07:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* 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>
2019-11-22 20:52:10 +07:00
Morris Jobke 6bbea33133
Simplify ternary operator statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-26 12:36:25 +07:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Roeland Jago Douma 0e66c2a38a
Do not scan for keys just get all the keys (with prefix)
Apparently scan leads to some issues sometimes on cluster. So just use
the get function to fetch the keys.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-05-16 09:52:05 +07:00
Morris Jobke 7f46898dad Compatibility with Redis and RedisCluster
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-05-04 12:42:58 +07:00
Robin McCorkell ef57c03dd2
Add Redis Cluster support
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-25 21:25:27 +07:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +07:00
Joas Schilling ba87db3fcc
Fix others 2016-07-21 18:13:57 +07:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +07:00
Robin Appelman e2f6aa3a57 factor out redis configuration into it's own factory 2016-05-03 16:02:17 +07:00
Roeland Jago Douma f3d05486fd
Move \OC\Memcache to PSR-4 2016-04-18 08:21:50 +07:00