Andrew Summers
c0f12d7691
Refactor OC\Server::getGetRedisFactory
...
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
2024-03-15 13:11:40 +01: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 +01:00
Côme Chilliet
f73f966c98
chore: Add missing ArrayAccess template parameters
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-06 10:24:41 +01: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 +01:00
Robin Appelman
7394645eb7
restore shared lock ttl when releasing
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-12-21 15:14:27 +01:00
Joas Schilling
aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +01:00
Christoph Wurst
ff672b11e2
feat: Add factory method for in-memory caches
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-11 13:37:22 +02:00
Christoph Wurst
fac05bce07
chore: Drop unused \OC\Memcache\Factory::createLowLatency
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-10-11 09:40:27 +02:00
Joas Schilling
93f0399a92
fix(memcache): Fix comparison of Memcache configs to classes
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-16 16:05:50 +02:00
Daniel Kesselberg
7cab58237d
chore: remove version check for apc extension
...
APC is gone since PHP 7.0.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-08-10 15:02:19 +02:00
Robin Appelman
9f1d497a0b
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
...
Refactors "strpos" calls in lib/private to improve code readability.
2023-06-01 23:10:00 +02:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +03:30
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 +01: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 +01:00
Robin Appelman
853ec60f3e
also cache backend for user in memory instead of always going to redis
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-10 12:25:23 +01:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +01: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 +01: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 +02:00
Arthur Schiwon
90104bc1c4
memcached should not throw arbitrary exceptions
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-06-17 18:32:14 +02:00
Carl Schwan
3f97bcdc75
Enable binary protocol again
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-06-17 17:24:24 +02:00
Carl Schwan
ba88187649
Add hit information to profiler
...
This might be helpful later on for the cache ui that is worked on in
https://github.com/nextcloud/profiler/pull/21
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-05-05 14:12:44 +02: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 +02:00
Côme Chilliet
6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-03-24 16:21:25 +01:00
Carl Schwan
e3a12b3482
Fix psalm issues in theming app
...
After this change, we are down to only one psalm warning for this app
and related to the Application.php. This also make composer
psam:update-baseline not silently ignore new errors.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-26 14:26:58 +01:00
Côme Chilliet
36d7c73e69
Always call flush() as getAllKeys() is broken
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-20 11:20:18 +01:00
Carl Schwan
6312c0df69
Check style update
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +01:00
Carl Schwan
aeecb72e96
Fix a few psalm issues and moved back to psalm/phar 4.18
...
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-12 20:03:06 +01: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 +01: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 +01:00
Côme Chilliet
113756db30
Fix ArrayAccess and JsonSerializable return types
...
First round of modifications for PHP 8.1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 09:28:56 +01:00
MichaIng
0304eea58d
Fix in locking cache check
...
The intention obviously was to check whether $lockingCacheClass is defined, and existing class, and available. It was however checked whether the $distributedCacheClass is an existing class, which would have caused an exception already in the previous distributed cache check.
Signed-off-by: MichaIng <micha@dietpi.com>
2021-07-05 23:11:13 +02:00
Gary Kim
b78f3a57d1
Migrate HintException to OCP
...
Signed-off-by: Gary Kim <gary@garykim.dev>
2021-06-30 15:28:02 -04:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
Richard Steinmetz
0f949eaeb1
Don't allow executing cli if cache backend is unavailable
...
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
2021-05-26 11:02:26 +02: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 +02:00
Christoph Wurst
0c5adaddf8
Drop \OC\Memcache\Factory::create
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-02-16 11:43:05 +01: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 +01:00
Christoph Wurst
d89a75be0b
Update all license headers for Nextcloud 21
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +02:00
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-08-24 14:54:25 +02:00
Joas Schilling
b09620651c
Don't use deprecated getIniWrapper() anymore
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-20 16:35:38 +02:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +02:00
Christoph Wurst
28f8eb5dba
Add visibility to all constants
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:54:27 +02: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 +02:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
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>
2020-04-10 14:19:56 +02:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00