Commit Graph

70 Commits

Author SHA1 Message Date
Stefan Weil b1a856d7b7 lib: Fix typos (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-07 19:51:27 +02:00
Joas Schilling f1c23a92a4 xcache.var_size with 64M should evaluate to isAvailable 2016-03-30 14:54:56 +02:00
Joas Schilling 2f67aa9bc4 Fix errors in memcached implementation 2016-03-14 12:39:34 +01:00
Lukas Reschke c353d51810 Remove Scrutinizer Auto Fixer 2016-03-01 17:48:23 +01:00
Lukas Reschke 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Scrutinizer Auto-Fixer 0d0151a3e1 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2016-02-19 09:43:11 +01:00
Robin Appelman a225fe4c96 Fix constructor arguments for APCUIterator 2016-01-18 12:20:05 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Lukas Reschke 2c4b9e03e0 Use new APCu API
This one is available since APCu 4.0, since we require APCu 4.0.6 this works fine. Also it brings us PHP 7 compatibility and thus fixes https://github.com/owncloud/core/issues/21095
2015-12-20 11:09:09 +01:00
Robin Appelman 0a80bf5573 Add interface for memcache backends that support setting ttl on exisiting keys 2015-12-09 14:39:12 +01:00
Morris Jobke 728648ad77 Replace new occurences of ini_get with IniWrapper methods 2015-11-23 14:12:36 +01:00
Clark Tomlinson 9caf4ffbfc Replacing ini_get instances with inigetwrapper usages 2015-11-23 14:12:31 +01:00
Thomas Müller c9b671a12f Handle errors on memcached level - fixes #17397 2015-11-10 15:58:17 +01:00
Lukas Reschke 78cad94ff4 Add support for Redis password auth
For enhanced security it is recommended to configure Redis to only accept connections with a password. (http://redis.io/topics/security)

This is especially critical since Redis supports the LUA scripting language and thus a simple SSRF vulnerability (as proven in http://benmmurphy.github.io/blog/2015/06/04/redis-eval-lua-sandbox-escape/ for example) may lead to a remote code execution.
2015-10-30 20:19:23 +01:00
Morris Jobke 8366ce2767 deduplicate @xenopathic 2015-10-06 09:52:19 +02:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Robin McCorkell b64e3f8db6 Fallback to complete Memcached flush if getAllKeys fails
Newer Memcached's do not support the underlying protocol commands that
getAllKeys() is implemented with. We should fallback to clearing
everything in that case, as causing (temporary) performance problems for
other applications on the server is better than having stale cached data.
2015-09-05 20:02:49 +01:00
Robin McCorkell 8efa23c895 Fix memcache factory unit tests 2015-07-16 03:53:18 +01:00
Robin McCorkell 7830434d78 Missing memcache should not cause occ hard-fail
Warning is now printed to logs, but occ and cron will still work.
2015-07-15 22:53:14 +01:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Joas Schilling 7d8b728066 Merge pull request #16832 from owncloud/memcache-fail
Throw exception if memcache misconfigured or missing
2015-06-16 11:00:18 +02:00
Robin Appelman a9ff242f6a switch to using watch to implement cas and cad on redis 2015-06-12 17:28:09 +02:00
Robin Appelman ac9f998abd add compare-and-delete to the memcache interface 2015-06-12 17:28:09 +02:00
Robin Appelman 1bc56a99e9 compare-and-set and compare-and-delete using lua scripts for redis 2015-06-12 17:28:09 +02:00
Vincent Petry 3b08b26589 Throw exception if memcache misconfigured or missing
Instead of falling back to null memcache, throw exceptions.
Also throw file locking specific exceptions in case the class is not
available.
2015-06-12 12:33:06 +02:00
Thomas Müller 3090348bf7 Null -> NullCache 2015-06-11 00:44:13 +02:00
Thomas Müller 48e915c7be Revert "Null -> NullCache"
This reverts commit ff24554e76.
2015-06-11 00:40:26 +02:00
Thomas Müller ff24554e76 Null -> NullCache 2015-06-11 00:34:03 +02:00
Joas Schilling bdc82dcfb9 Check for redis to be 2.2.5+ 2015-06-02 15:42:48 +02:00
Robin Appelman 6b965d71d1 add seperate config option for locking memcache backend 2015-06-01 13:22:56 +02:00
Vincent Petry 6df502a5aa Fix Null memcache fallback to match interface 2015-06-01 13:22:56 +02:00
Vincent Petry 5edf294ce5 Add CAS methods to Null memcache
This prevents breaking ownCloud completely when memcache is not enabled
and the locking code is triggered
2015-06-01 13:22:56 +02:00
Robin Appelman a40a237441 use trait for cas polyfill for xcache 2015-04-30 14:48:39 +02:00
Robin Appelman acf30ede95 add compare and swap to memcache 2015-04-30 14:48:39 +02:00
Robin Appelman 29213b6136 extends memcache with add, inc and dec 2015-04-30 14:48:36 +02:00
Michael Telatynski 8ebf9de3f8 Memcache\Redis Add DB Select Functionality 2015-04-15 21:24:38 +01:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Andreas Fischer 630b7edc54 Do not use APCu when apc.enabled is Off. 2015-03-25 14:52:01 +01:00
Lukas Reschke c233f2c90b Add version and path to cache prefix
Prevents to have the cache reused by other instances on the server which have possible the same instance ID and also invalidates older cache entries after an upgrade which can cause unwanted side-effects.

Impact for deployment: The same cache will only get used if ownCloud is installed with the same version and under the same path. But this should be a basic requirement anyways.
2015-03-17 12:39:49 +01:00
Robin McCorkell 78819da3bf \OC\Memcache\Cache implements \OCP\ICache 2015-03-05 11:36:34 +00:00
Robin McCorkell 0e4933e6d2 Refactor \OC\Memcache\Factory
Caches divided up into two groups: distributed and local. 'Low latency' is an
alias for local caches, while the standard `create()` call tries to get
distributed caches first, then local caches.

Memcache backend is set in `config.php`, with the keys `memcache.local` and
`memcache.distributed`. If not set, `memcache.distributed` defaults to the value
of `memcache.local`.
2015-03-05 11:36:34 +00:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Lukas Reschke cd4c064ebf Revert "add debug log for memcache instantiation" 2015-02-18 14:16:14 +01:00
Lukas Reschke b701bbd8c5 Use APCu only if available in version 4.0.6 and higher
APCu before 4.0.6 is unbelievable buggy and tend to segfault the PHP process (i.e. the whole webserver)

This potentially fixes https://github.com/owncloud/core/issues/14175

Requires a backport to stable8
2015-02-17 13:28:02 +01:00
Jörn Friedrich Dreyer 87db136508 add debug log for memcache instantiation 2015-02-16 18:05:43 +01:00
Joas Schilling 8848b5f067 Add an array implementation of cache and use it if we are not debugging 2015-02-16 14:55:50 +01:00
Joas Schilling e25998df0f Json_(en|de)code values on redis to be able to cache arrays 2015-01-20 10:51:27 +01:00
Robin McCorkell 17dd5d0816 Add Null memcacher 2015-01-09 13:18:00 +00:00
Andreas Fischer 0ba5c182f0 HHVM: In APC cache clear, only request the cache key in APCIterator.
The default value of the $format parameter of the APCIterator constructur is
APC_ITER_ALL which instructs the iterator to provide all available information
on cache values being iterated over. Only the key value is necessary for
matching and deletion via apc_delete(), though.

This prevents a "Format values FILENAME, DEVICE, INODE, MD5, NUM_HITS, MTIME,
CTIME, DTIME, ATIME, REFCOUNT not supported yet." notice on HHVM.
2014-12-19 03:24:00 +01:00