summaryrefslogtreecommitdiffstats
path: root/lib/private/Memcache
Commit message (Collapse)AuthorAgeFilesLines
* redis: move lua scripts to class and add type hintsVarun Patil2023-05-311-20/+20
| | | | Signed-off-by: Varun Patil <varunpatil@ucla.edu>
* redis: use atomic operations everywhereVarun Patil2023-05-311-35/+55
| | | | | | | | | | | | 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>
* Fix RedisClusterGit'Fellow2023-03-221-1/+1
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Move from DEL to UNLINKGit'Fellow2023-03-221-3/+3
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* also cache backend for user in memory instead of always going to redisRobin Appelman2023-02-101-0/+54
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* composer run cs:fixCôme Chilliet2023-01-201-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Only setup redis connection if neededJulius Härtl2022-11-221-19/+27
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Correctly handle Redis::keys returning falseCôme Chilliet2022-09-291-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* memcached should not throw arbitrary exceptionsArthur Schiwon2022-06-171-24/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Enable binary protocol againCarl Schwan2022-06-171-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add hit information to profilerCarl Schwan2022-05-051-0/+1
| | | | | | | 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>
* Add a built-in profiler inside NextcloudCarl Schwan2022-04-048-141/+479
| | | | | | The webui is provided by a seperate application named profiler Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Migrate from ILogger to LoggerInterface in lib/privateCôme Chilliet2022-03-241-15/+10
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm issues in theming appCarl Schwan2022-01-261-2/+7
| | | | | | | | 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>
* Always call flush() as getAllKeys() is brokenCôme Chilliet2022-01-201-21/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Check style updateCarl Schwan2022-01-131-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix a few psalm issues and moved back to psalm/phar 4.18Carl Schwan2022-01-121-0/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Check if directoy is writable instead of possibly missing fileCarl Schwan2021-12-201-10/+14
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Allow to log DB, redis and LDAP requests into filesJoas Schilling2021-12-012-5/+93
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix ArrayAccess and JsonSerializable return typesCôme Chilliet2021-11-231-3/+7
| | | | | | First round of modifications for PHP 8.1 Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix in locking cache checkMichaIng2021-07-051-1/+1
| | | | | 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>
* Migrate HintException to OCPGary Kim2021-06-302-3/+3
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-049-9/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Don't allow executing cli if cache backend is unavailableRichard Steinmetz2021-05-261-26/+6
| | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* ensure redis returns bool for hasKeyArthur Schiwon2021-04-131-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Drop \OC\Memcache\Factory::createChristoph Wurst2021-02-161-10/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Actually set the TTL on redis setRoeland Jago Douma2020-12-211-1/+7
| | | | | | Else well the keys remain for ever and ever. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-162-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Don't use deprecated getIniWrapper() anymoreJoas Schilling2020-08-201-2/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Update license headers for 19Christoph Wurst2020-04-294-0/+4
| | | | 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-105-5/+5
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-102-3/+2
| | | | | | | | | | | | | | | 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>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-312-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-262-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-059-11/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-1/+0
| | | | | | | | | | | * 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>
* Drop support for xcacheDaniel Kesselberg2018-08-121-137/+0
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Properly provide local memcache check to ICacheFactoryMorris Jobke2018-03-131-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* 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-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Simplify ternary operator statementsMorris Jobke2018-01-261-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Request->getHeader() should always return a stringMorris Jobke2018-01-171-2/+2
| | | | | | | | PHPDoc (of the public API) says that this method returns string but it also returns null, which is not allowed in some method calls. This fixes that behaviour and returns an empty string and fixes all code paths that explicitly checked for null to be still compliant. Found while enabling the strict_typing for lib/private for the PHP7+ migration. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Made the cache factory strictRoeland Jago Douma2018-01-161-15/+18
| | | | | | | | | * Return types * Typehints * made strict * fix tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersMorris Jobke2017-11-064-0/+6
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* More phpstorm inspection fixesRoeland Jago Douma2017-07-242-12/+12
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not scan for keys just get all the keys (with prefix)Roeland Jago Douma2017-05-161-6/+4
| | | | | | | 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>
* Compatibility with Redis and RedisClusterMorris Jobke2017-05-041-2/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>