Commit graph

97 commits

Author SHA1 Message Date
Sam Hemelryk
ed2de2ecc7 MDL-45724 cache: fixed warning structure bug 2014-07-23 15:24:59 +12:00
Sam Hemelryk
727c21733e MDL-45724 cache: admin screen now shows store warnings
Implemented a means by which cache store instance can communicate
warnings due to things such as conflicting configurations etc.
2014-07-18 08:29:41 +12:00
Sam Hemelryk
c9ef35e1f3 MDL-46208 cachestore_mongo: fixed invalid collection name use 2014-07-04 08:11:27 +12:00
Eric Merrill
9043a10907 MDL-42071 caching Validate setservers correctly for php pre 5.5 2014-07-01 22:28:22 -04:00
Eric Merrill
cd230b31b6 MDL-42071 caching Skip memcache(d) tests if no servers defined 2014-07-01 10:28:01 -04:00
Eric Merrill
7abaa5f46c MDL-42071 caching Support for clustered memcache caching
For stores where there is a very high rate of sets compared to gets, it
is beneficial to retrieve from the local server, skipping the network
overhead, at the expense of having to set many severs when a key is set.

This patch adds a memcache option to enable clustering. When on, only
one "server" is allowed, which will be where fetches are from, while
sets/updates/deletes/purges will occur to the all the servers in the
"set server" list.

To run unit tests, define TEST_CACHESTORE_MEMCACHE_TESTSERVERS with
multiple (return delimited) servers.
2014-06-29 23:02:31 -04:00
Eric Merrill
1c0518a625 MDL-42071 caching Support for clustered memcached caching
For stores where there is a very high rate of sets compared to gets, it
is beneficial to retrieve from the local server, skipping the network
overhead, at the expense of having to set many severs when a key is set.

This patch adds a memcached option to enable clustering. When on, only
one "server" is allowed, which will be where fetches are from, while
sets/updates/deletes/purges will occur to the all the servers in the
"set server" list.

To run unit tests, define TEST_CACHESTORE_MEMCACHED_TESTSERVERS with
multiple (return delimited) servers.
2014-06-29 23:02:06 -04:00
Sam Hemelryk
eefb680d8e MDL-45513 cache: implemented defines for unit testing alternative caches 2014-05-30 08:41:07 +12:00
Eloy Lafuente (stronk7)
538bf99ece MDL-45486 Bump all versions to planned release
This bumps all versions to planned 2.7 release
(2014051200) version and all the dependencies to
current 2.7rc2 (2014050800)
2014-05-09 02:12:28 +02:00
Damyon Wiese
e4f1dd46b0 MDL-45412 Cache: Mongo DB string change (older is less than) 2014-05-06 12:03:44 +08:00
Damyon Wiese
7c6f2e29ae MDL-45412 Cache: Look for the newer classname first (mongo store) 2014-05-06 12:03:27 +08:00
Sam Hemelryk
6deb0813d0 MDL-45412 cachestore_mongodb: added notification of old Mongo version use 2014-05-06 09:30:27 +12:00
Sam Hemelryk
4907a8ed70 MDL-45412 cachestore_mongodb: fixed use of deprecated Mongo class 2014-05-06 09:29:45 +12:00
Michael Aherne
90a3a62096 MDL-44066 caching Don't advertise session mode for MongoDB and memcached 2014-02-05 10:48:22 +00:00
Sam Hemelryk
ccc22a096a MDL-43349 cache: is_ready now checks are_requirements_met by default
(Fixes the fixed forwarded static call bug reverted in a5581c7)
2014-01-07 11:47:18 +08:00
Dan Poltawski
a5581c7376 Revert "MDL-43349 cache: is_ready now checks are_requirements_met by default"
This reverts commit 2201c02d73.
2014-01-06 14:47:12 +08:00
Sam Hemelryk
2201c02d73 MDL-43349 cache: is_ready now checks are_requirements_met by default 2014-01-02 09:55:51 +13:00
Jean-Philippe Gaudreau
353643d33f MDL-41246 cache: Fix PHP notice of non well formed numeric values for the memcache store 2013-12-18 08:52:08 -05:00
sam marshall
5c138b258d MDL-42839 MUC: Memcache server configuration too sensitive to whitespace 2013-11-12 12:33:36 +00:00
Eloy Lafuente (stronk7)
f39c82ebed MDL-42701 Bump all versions near 2.6 release 2013-11-05 02:36:00 +01:00
Eloy Lafuente (stronk7)
c718b49bfc Merge branch 'm26_MDL-41410_Move_Comment_To_Appropriate_Place' of https://github.com/scara/moodle 2013-08-27 19:45:24 +02:00
Dan Poltawski
51eba172e6 Merge branch 'MDL-41291-master' of git://github.com/mr-russ/moodle 2013-08-26 17:50:08 +08:00
Sam Hemelryk
85008bedd5 MDL-41106 cache: several fixes for the session cache.
This issue makes several fixes for the session loader and the session store.
 * maxsize argument now works for session caches.
 * fixed performance hole when interation occurs frequently.
 * fixed cache purge bug occuring when multiple caches are defined before being used.
 * improved lastaccess handling.

Big thanks to Marina who contributed the following commits:
 * Always make sure the elements in cache are sorted so we need to remove only elements in the beginning of array
 * Remove expired elements from session store to free memory
 * Minor bug fixes
2013-08-26 09:15:57 +12:00
Matteo Scaramuccia
a94bc886bb MDL-41410 Caching: move comment to the appropriate place.
MDL-38162 fixes the issue about testing the connection to the memcached
daemon, which means testing once the connection to the pool of servers
and not to each of the servers while being added to the pool.
It misses to move the comment to that code too.
2013-08-25 14:00:47 +02:00
Russell Smith
90048725b0 MDL-41291 cache: Use fread to avoid race conditions 2013-08-19 20:18:57 +10:00
Frederic Massart
cbb3990bcb MDL-41071 core: plugininfo_mod caches in plugininfo_mod definition 2013-08-07 20:55:22 +08:00
Sam Hemelryk
609bda269e Merge branch 'w31_MDL-40891_m26_mkdirrace' of https://github.com/skodak/moodle 2013-07-29 11:53:02 +12:00
Petr Škoda
6763fde8d4 MDL-40891 prevent exceptions when creating directories in file store
Even if cache creation fails moodle should continue working.
2013-07-26 20:28:57 +02:00
Damyon Wiese
05b659b252 MDL-40727 Cache: Fix file cache store on windows. 2013-07-24 17:04:44 +08:00
Eloy Lafuente (stronk7)
154bc6b240 Merge branch 'w30_MDL-40642_m26_umask' of https://github.com/skodak/moodle 2013-07-23 23:42:11 +02:00
Eloy Lafuente (stronk7)
e71c47bf8c MDL-40700 tests: skip if there is not instance
Various reasons can lead to the cache stores not being available
(missing extension, configuration...). Under those situations
the test must be skipped because for sure it will break if
we continue.
2013-07-23 17:00:02 +02:00
Eloy Lafuente (stronk7)
9e1e94aafa Merge branch 'wip-MDL-40700-m26' of git://github.com/samhemelryk/moodle 2013-07-23 13:58:20 +02:00
Eloy Lafuente (stronk7)
d4731fd002 Merge branch 'wip-MDL-40677-m26' of git://github.com/samhemelryk/moodle 2013-07-23 12:52:50 +02:00
Sam Hemelryk
deeae9c155 Merge branch 'MDL-40680-master' of git://github.com/danpoltawski/moodle 2013-07-23 14:14:27 +12:00
Sam Hemelryk
67da59999a MDL-40677 cache: fixed bug with maxsize when setting 2013-07-22 10:42:04 +12:00
Sam Hemelryk
6f6a8dd19e MDL-40677: cachestore_static: implemented support for maxsize 2013-07-22 10:42:04 +12:00
Sam Hemelryk
cb3590091e MDL-40677: cachestore_session: implemented support for maxsize 2013-07-22 10:42:04 +12:00
Sam Hemelryk
7dfa10b02e MDL-40700 cache: memcache and memcached stores now allow alphanumext prefixes 2013-07-22 10:41:38 +12:00
Chris Wharton
a423acd95c MDL-40700 cache: Validate memcache key prefix field 2013-07-22 10:41:37 +12:00
Petr Škoda
eb1ee665f6 MDL-40642 use this->cfg in local file store when fixing permissions 2013-07-19 09:18:44 +02:00
Petr Škoda
eb459f7192 MDL-40642 set more restrictive umask and use proper permission for new dirs and files 2013-07-19 09:18:44 +02:00
Eloy Lafuente (stronk7)
3f0a8871d3 Merge branch 'MDL-40555-master' of git://github.com/FMCorz/moodle
Conflicts:
	cache/stores/static/lib.php
2013-07-16 09:57:34 +02:00
Dan Poltawski
a10d6199c8 MDL-40680 store_memcached: fix serialiser options
* Use correct lang string for SERIALIZER_IGBINARY
* Use PARAM_INT for the parameter
2013-07-16 09:37:53 +08:00
Russell Smith
ae21341523 MDL-40538 caching: Use isset for performance
isset is much faster than array_key_exists. For caches we need to
ensure as much performance as possible. To all null to continue to
be stored and provide correct results, non ttl also now saves in
$this->store[$key][0].  As isset($this->store[$key]) will return
true in all cases.

time() as found in cache::now() can be slow on some platforms and
we shouldn't bother checking it unless needed. It also stops non-ttl
caches paying the ttl price.

Unit tests were adjusted to ensure null is still handled correctly
when we are only using isset.
2013-07-10 10:15:19 +10:00
Frederic Massart
0d8eac408b MDL-40555 cache: Static store is searchable 2013-07-08 15:09:04 +08:00
Sam Hemelryk
1878661402 MDL-40100 cache: removed unneeded includes from add instance forms 2013-06-10 10:23:28 +12:00
Sam Hemelryk
9aacf24b62 MDL-39456 cachestore_file: added reference to global $CFG
By holding onto a reference of the global $CFG object we
can be sure that it isn't destroyed before we are done
with it.
This allows for caches to be used within destructors for
purposes such as delayed writes.
2013-05-24 09:51:11 +12:00
Helen Foster
9f3e096899 MDL-39642 Merge English strings from the en_fix language pack 2013-05-13 09:58:43 +02:00
Dan Poltawski
ac15fc95fa Merge branch 'MDL-39448-master' of git://github.com/sammarshallou/moodle
Conflicts:
	cache/stores/memcache/version.php
2013-05-07 11:43:23 +01:00
Dan Poltawski
2da94da7b5 Merge branch 'MDL-39473-master' of git://github.com/sammarshallou/moodle 2013-05-06 14:32:33 +01:00