When a cachable object is store in the static cache from
the backing store, it was incorrect serialised rather than
using the wake function. This has been resolved and tests added.
During the investigation into cacheable_object, it was discovered
that set_identifiers never removes identifiers when you call it,
so set_identifiers(array('a')) and set_identifiers(array('b')) really
resulted in array('a','b') as the identifiers rather than 'b'.
The fix for this issue depends on the set_identifiers fix and
they have been coupled together as a result.
When added a memcached instance you can now select whether the cache is
being shared by other applications. The setting will determine the
purging strategy.
Shared caches will have individual keys deleted while dedicated caches
will have the entire cache purged (better performance over networks).
Note: This option only works with the correct version of the php
memcached extension and with the multi-site safe changes.
- We only now serialize when required, eg when the store doesn't do it.
- static acceleration now serializes on set to reduce overhead on load.
- null now works in static acceleration as we use an array for storage metadata
- static acceleration delete uses isset rather than an array_search.
- We only now serialize when required, eg when the store doesn't do it.
- static acceleration now serializes on set to reduce overhead on load.
- null now works in static acceleration as we use an array for storage metadata
- static acceleration delete uses isset rather than an array_search.
If the cache does all the dereferencing when it stores and loads
the objects, then the cache loaders don't need to do that work.
This is true of all caches that use something other than PHP's memory
to store their results.
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.
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.
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')) { ...
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.
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.
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
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.
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.