287 Commits

Author SHA1 Message Date
David Monllao
7d8edf67ae Merge branch 'wip-MDL-50932-master' of git://github.com/marinaglancy/moodle 2015-08-17 11:43:42 +08:00
Andrew Nicols
6270f4dbdd MDL-50949 cache: Improve cache performance tests 2015-08-10 08:04:03 +08:00
Frederic Massart
47b04bcf7f MDL-50949 cache: Tests for performance debugging of cache usage 2015-07-29 14:38:58 +08:00
Frederic Massart
e75115810c MDL-50949 cache: Performance debug keeps track of hits/misses/sets 2015-07-29 12:56:10 +08:00
Marina Glancy
7b3c5e0e0b MDL-50932 cache: fix bug in prescanned file store
Thanks to Mark Nielsen for providing a patch
2015-07-29 11:23:01 +08:00
David Monllao
b3e6802cf8 MDL-42192 caches: Adding simpledata tests 2015-05-29 17:18:31 +08:00
Marina Glancy
2d1164800c MDL-49572 cache: correctly purge cache on event 2015-05-20 14:07:58 +08:00
Eloy Lafuente (stronk7)
26ea380d24 MDL-50102 versions: bump all versions and requires near release
version = planned 2015051100 release version
requires= current 2015050500 rc1 version

Note: On purpose, the course format social wrong version (2015102100)
has been kept unmodified. Looking forward a solution right now.
2015-05-05 17:43:19 +02:00
Helen Foster
0634dc3b76 MDL-50033 lang: Merge English strings from the en_fix language pack 2015-04-29 21:43:00 +02:00
Sam Hemelryk
7fa57e0341 MDL-39459 cache: mode included in stats output
The cache store mode is now included in the performance stats
printed at the bottom of the page.
It is represented as either [a] [s] or [r] and a title is used
to actually state the mode.
2015-02-04 09:35:21 +13:00
Eloy Lafuente (stronk7)
c0d8831ae7 MDL-45699 behat: Don't use behat/lib.php functions in core.
behat/lib.php script should not be usually included, neither any of its functions
used within mooodle code at all. It's for exclusive use of behat and
moodle setup.php. For places requiring a different/special behavior
needing to check if are being run  as part of behat tests, use:
    if (defined('BEHAT_SITE_RUNNING')) { ...
2014-12-23 12:29:44 +01:00
Eloy Lafuente (stronk7)
093c161d46 Merge branch '45699-29' of git://github.com/samhemelryk/moodle
Conflicts:
	cache/upgrade.txt
2014-12-23 02:01:36 +01:00
Eloy Lafuente (stronk7)
57bd925603 MDL-48568 cache: make tests aware of default application store
When an alternative cache configuration is used, aka:

define('TEST_CACHE_USING_ALT_CACHE_CONFIG_PATH', true);
$CFG->altcacheconfigpath = '/tmp/xxxxx.php';

the get_expected_application_cache_store() method was not able of
retroffiting the default application store being used.

This commit just implements that functionality so, when
executing unit tests using alternative configuration, assertions
looking for that will pass without a problem.
2014-12-23 01:34:35 +01:00
Sam Hemelryk
63b159d0d4 MDL-48568 cache: stores now determine testing
Cache stores are now responsible for deciding if they are suitable
for use as the primary cache store during unit and acceptance tests

Changes are as follows:
* New method: cache_store::ready_to_be_used_for_testing
* Core cache store have been updated to override this method as
  required.
* MongoDB usesafe default changed to true to match actual default
  behaviour.
2014-12-12 09:30:46 +13:00
Sam Hemelryk
427c41ef2d MDL-45699 cache: renamed cache_config_phpunittest
Renamed cache_config_phpunittest to cache_config_testing
2014-12-09 10:51:38 +13:00
Sam Hemelryk
45a8db7f7b MDL-45699 cache: acceptance test improvements
We now use the unit test cache config class when running
acceptance tests so that the same defines are applicable there.
2014-12-09 10:51:34 +13:00
Dan Poltawski
4592f67789 Merge branch '36236-29' of git://github.com/samhemelryk/moodle 2014-12-04 12:04:11 +00:00
Eloy Lafuente (stronk7)
27bfd2c4d1 Merge branch '38343-29' of git://github.com/samhemelryk/moodle 2014-11-25 00:26:41 +01:00
Sam Hemelryk
32bc89811c MDL-36236 cache: clarified locking strings
We copy the cachedef_locking string as that cache definition is
used for locking and its name is more than likely the descriptive
word we are looking for.

AMOS BEGIN
  CPY [cachedef_locking,cache],[locking,cache]
AMOS END
2014-11-21 11:33:07 +13:00
Sam Hemelryk
83bee88119 MDL-47832 cache: removed data source aggregate functionality
Cache data source aggregate functionality was found to be broken
and unused, because of this the decision was made to remove it
rather than fix it.
As it was broken we did not follow typical deprecation methods and
instead the code was removed outright with only structure
remaining and left deprecated.
2014-11-20 11:02:56 +13:00
Sam Hemelryk
51e7f05043 MDL-38343 cache: better test server strings 2014-11-18 12:35:01 +13:00
Eloy Lafuente (stronk7)
de881693f7 MDL-48021 bump: Bump all versions to planned release
This bumps all versions to planned 2.8 release
(2014111000) version and all the dependencies to
current 2.8rc1 (2014110400)
2014-11-04 17:52:35 +01:00
Sam Hemelryk
1b5b97fac5 MDL-47917 cachestore_memcached: fixed get_many ordering 2014-11-03 14:08:25 +13:00
Sam Hemelryk
c1db791e98 MDL-47608 cachestore_mongo: fixed unit test error
If you configured your site to run mongo unit tests and had
the mongo extension and backend installed but did not have the
mongo service running you would get a fatal error when running
the unit tests.
That problem has been fixed by checking the mongo test instance
is ready before returning it.
2014-10-20 11:03:57 +13:00
Sam Hemelryk
c1fb8f6d2e MDL-46151 cachestore_memcache: now checks extension version for support 2014-10-14 08:27:45 +13:00
Eric Merrill
e75becf3b3 MDL-46796 caching: Fix missing property error for memcache(d) 2014-08-13 08:24:04 -04:00
Sam Hemelryk
ed2de2ecc7 MDL-45724 cache: fixed warning structure bug 2014-07-23 15:24:59 +12:00
Dan Poltawski
5f7ab6e949 Merge branch '45828-28' of git://github.com/samhemelryk/moodle 2014-07-22 09:33:01 +01:00
Sam Hemelryk
915140c9b5 MDL-45724 cache: added cache API warnings to the admin notifications page 2014-07-21 09:48:33 +12:00
Sam Hemelryk
6e247996ea MDL-45828 cache: definitions now sorted in the admin UI 2014-07-21 09:25:22 +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
2c0eb5e696 MDL-37145 caching: noted recommendation for dedicated memcache servers
Several reports have been made about the unexpected purging of entire
memcached servers when MUC is configured to use Memcache and caches
get purged.
This is expected and occurs because the memcache extenions don't
provide isolated containers. Moodle data is stored along side any other
data in the cache and when caches get purged all data gets removed
whether it belongs to Moodle or not.

The docs cover this point and here I've added notes about this to both
config-dist.php and cache/README.md
2014-06-23 10:57:15 +12:00
Sam Hemelryk
eefb680d8e MDL-45513 cache: implemented defines for unit testing alternative caches 2014-05-30 08:41:07 +12:00
Sam Hemelryk
79a8ea653c MDL-45513 cache: added support to unit tests for alt cache stores 2014-05-30 08:41:07 +12:00
Damyon Wiese
4e8a350c35 Merge branch 'MDL-45618' of git://github.com/timhunt/moodle 2014-05-20 14:59:48 +08:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Eric Merrill
e39099ac36 MDL-45603 cache Fix the mappingsonly option to work as advertised. 2014-05-17 23:48:33 -04: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
Damyon Wiese
1ed6bd87a2 Merge branch 'MDL-44006-m' of https://github.com/micaherne/moodle 2014-02-24 12:30:55 +08:00
Michael Aherne
90a3a62096 MDL-44066 caching Don't advertise session mode for MongoDB and memcached 2014-02-05 10:48:22 +00:00
Mark Nielsen
6cc9ac6cdb MDL-43734: Prevent purging of all user session cache 2014-01-16 11:22:28 -08:00