$form->addHelpButton('setservers', 'setservers', 'cachestore_memcached');
$form->disabledIf('setservers', 'clustered');
$form->setType('setservers', PARAM_RAW);
+
+ $version = phpversion('memcached');
+ if (!$version || !version_compare($version, cachestore_memcached::REQUIRED_VERSION, '>=')) {
+ $form->addElement('header', 'upgradenotice', get_string('notice', 'cachestore_memcached'));
+ $form->setExpanded('upgradenotice');
+ $form->addElement('html', nl2br(get_string('upgrade200recommended', 'cachestore_memcached')));
+ }
}
/**
$string['hash_fnv1a_32'] = 'FNV1A_32';
$string['hash_hsieh'] = 'Hsieh';
$string['hash_murmur'] = 'Murmur';
+$string['notice'] = 'Notice';
$string['pluginname'] = 'Memcached';
$string['prefix'] = 'Prefix key';
$string['prefix_help'] = 'This can be used to create a "domain" for your item keys allowing you to create multiple memcached stores on a single memcached installation. It cannot be longer than 16 characters in order to ensure key length issues are not encountered.';
$string['useserialiser_help'] = 'Specifies the serializer to use for serializing non-scalar values.
The valid serializers are Memcached::SERIALIZER_PHP or Memcached::SERIALIZER_IGBINARY.
The latter is supported only when memcached is configured with --enable-memcached-igbinary option and the igbinary extension is loaded.';
+$string['upgrade200recommended'] = 'We recommend you upgrade your Memcached PHP extension to version 2.0.0 or greater.
+The version of the Memcached PHP extension you are currently using does not provide the functionality Moodle uses to ensure a sandboxed cache. Until you upgrade we recommend you do not configure any other applications to use the same Memcached servers as Moodle is configured to use.';
This allows the cache loader to decide if it needs to handle dereferencing or whether the data
coming directly to it has already had references resolved.
- see supports_dereferencing_objects in store.php.
+* The Memcached cache store no longer flushes the memcache servers it is connected to providing your memcached php extension is version 2.0.0 or greater.
+ There is a notice to this effect when adding or editing a memcached cache store instance.
=== 2.9 ===
* Cache data source aggregation functionality has been removed. This functionality was found to be broken and unused.