Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-25290 cache: Renamed plugin from cache => cachestore

  • Loading branch information...
commit 6fec18203b59dd6aa3df35888fdef8085bd5737b 1 parent f23fbfd
@samhemelryk samhemelryk authored
Showing with 172 additions and 162 deletions.
  1. +2 −2 admin/settings/plugins.php
  2. +2 −2 cache/classes/config.php
  3. +2 −2 cache/classes/dummystore.php
  4. +2 −2 cache/classes/factory.php
  5. +4 −4 cache/classes/helper.php
  6. +1 −1  cache/classes/loaders.php
  7. +3 −2 cache/classes/lock.php
  8. +1 −1  cache/forms.php
  9. +9 −0 cache/lib.php
  10. +30 −30 cache/locallib.php
  11. +1 −1  cache/renderer.php
  12. +8 −8 cache/stores/file/addinstanceform.php
  13. +1 −1  cache/stores/file/lang/en/{cache_file.php → cachestore_file.php}
  14. +6 −6 cache/stores/file/lib.php
  15. +2 −2 cache/stores/file/version.php
  16. +4 −4 cache/stores/memcache/addinstanceform.php
  17. +1 −1  cache/stores/memcache/lang/en/{cache_memcache.php → cachestore_memcache.php}
  18. +4 −4 cache/stores/memcache/lib.php
  19. +2 −2 cache/stores/memcache/settings.php
  20. +2 −2 cache/stores/memcache/version.php
  21. +14 −14 cache/stores/memcached/addinstanceform.php
  22. +1 −1  cache/stores/memcached/lang/en/{cache_memcached.php → cachestore_memcached.php}
  23. +16 −16 cache/stores/memcached/lib.php
  24. +2 −2 cache/stores/memcached/settings.php
  25. +2 −2 cache/stores/memcached/version.php
  26. +18 −18 cache/stores/mongodb/addinstanceform.php
  27. +1 −1  cache/stores/mongodb/lang/en/{cache_mongodb.php → cachestore_mongodb.php}
  28. +4 −4 cache/stores/mongodb/lib.php
  29. +2 −2 cache/stores/mongodb/settings.php
  30. +2 −2 cache/stores/mongodb/version.php
  31. +1 −1  cache/stores/session/lang/en/{cache_session.php → cachestore_session.php}
  32. +6 −6 cache/stores/session/lib.php
  33. +2 −2 cache/stores/session/version.php
  34. +1 −1  cache/stores/static/lang/en/{cache_static.php → cachestore_static.php}
  35. +3 −3 cache/stores/static/lib.php
  36. +2 −2 cache/stores/static/version.php
  37. +4 −4 cache/testperformance.php
  38. +2 −2 cache/tests/cache_test.php
  39. +1 −1  lib/moodlelib.php
  40. +1 −1  lib/setup.php
View
4 admin/settings/plugins.php
@@ -498,10 +498,10 @@
$ADMIN->add('cache', new admin_externalpage('cacheconfig', new lang_string('cacheconfig', 'cache'), $CFG->wwwroot .'/cache/admin.php'));
$ADMIN->add('cache', new admin_externalpage('cachetestperformance', new lang_string('testperformance', 'cache'), $CFG->wwwroot . '/cache/testperformance.php'));
$ADMIN->add('cache', new admin_category('cachestores', new lang_string('cachestores', 'cache')));
- foreach (get_plugin_list('cache') as $plugin => $path) {
+ foreach (get_plugin_list('cachestore') as $plugin => $path) {
$settingspath = $path.'/settings.php';
if (file_exists($settingspath)) {
- $settings = new admin_settingpage('cache_'.$plugin.'_settings', new lang_string('pluginname', 'cache_'.$plugin), 'moodle/site:config');
+ $settings = new admin_settingpage('cachestore_'.$plugin.'_settings', new lang_string('pluginname', 'cachestore_'.$plugin), 'moodle/site:config');
include($settingspath);
$ADMIN->add('cachestores', $settings);
}
View
4 cache/classes/config.php
@@ -126,7 +126,7 @@ public function load() {
continue;
}
$plugin = $store['plugin'];
- $class = 'cache_store_'.$plugin;
+ $class = 'cachestore_'.$plugin;
if (!array_key_exists($plugin, $availableplugins) && (!class_exists($class) || !is_subclass_of($class, 'cache_store'))) {
// Not a valid plugin, or has been uninstalled, just skip it an carry on.
debugging('Invalid cache store in config. Not an available plugin.', DEBUG_DEVELOPER);
@@ -327,7 +327,7 @@ public function get_stores_for_definition(cache_definition $definition) {
if (defined('NO_CACHE_STORES') && NO_CACHE_STORES !== false) {
// Yip its been disabled.
// To facilitate this we are going to always return an empty array of stores to use.
- // This will force all cache instances to use the cache_store_dummy.
+ // This will force all cache instances to use the cachestore_dummy.
// MUC will still be used essentially so that code using it will still continue to function but because no cache stores
// are being used interaction with MUC will be purely based around a static var.
return array();
View
4 cache/classes/dummystore.php
@@ -37,7 +37,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_dummy implements cache_store {
+class cachestore_dummy implements cache_store {
/**
* The name of this store.
@@ -262,7 +262,7 @@ public function cleanup() {
* @return false
*/
public static function initialise_test_instance(cache_definition $definition) {
- $cache = new cache_store_dummy('Dummy store test');
+ $cache = new cachestore_dummy('Dummy store test');
$cache->initialise($definition);
return $cache;;
}
View
4 cache/classes/factory.php
@@ -295,12 +295,12 @@ public function create_definition($component, $area, $aggregate = null) {
* Creates a dummy store object for use when a loader has no potential stores to use.
*
* @param cache_definition $definition
- * @return cache_store_dummy
+ * @return cachestore_dummy
*/
protected function create_dummy_store(cache_definition $definition) {
global $CFG;
require_once($CFG->dirroot.'/cache/classes/dummystore.php');
- $store = new cache_store_dummy();
+ $store = new cachestore_dummy();
$store->initialise($definition);
return $store;
}
View
8 cache/classes/helper.php
@@ -127,7 +127,7 @@ public static function get_class_for_mode($mode) {
public static function get_cache_stores(cache_definition $definition) {
$instance = cache_config::instance();
$stores = $instance->get_stores_for_definition($definition);
- $stores = self::initialise_cache_store_instances($stores, $definition);
+ $stores = self::initialise_cachestore_instances($stores, $definition);
return $stores;
}
@@ -138,7 +138,7 @@ public static function get_cache_stores(cache_definition $definition) {
* @param cache_definition $definition
* @return array
*/
- protected static function initialise_cache_store_instances(array $stores, cache_definition $definition) {
+ protected static function initialise_cachestore_instances(array $stores, cache_definition $definition) {
$return = array();
$factory = cache_factory::instance();
foreach ($stores as $name => $details) {
@@ -154,14 +154,14 @@ protected static function initialise_cache_store_instances(array $stores, cache_
* Returns the cache store to be used for locking or false if there is not one.
* @return cache_store|boolean
*/
- public static function get_cache_store_for_locking() {
+ public static function get_cachestore_for_locking() {
$factory = cache_factory::instance();
$definition = $factory->create_definition('core', 'locking');
$instance = cache_config::instance();
$stores = $instance->get_stores_for_definition($definition);
foreach ($stores as $name => $details) {
if ($details['useforlocking']) {
- $instances = self::initialise_cache_store_instances(array($name => $details), $definition);
+ $instances = self::initialise_cachestore_instances(array($name => $details), $definition);
return reset($instances);
}
}
View
2  cache/classes/loaders.php
@@ -1083,7 +1083,7 @@ public function release_lock($key) {
*/
protected function ensure_lock_store_available() {
if ($this->lockstore === null) {
- $this->lockstore = cache_helper::get_cache_store_for_locking();
+ $this->lockstore = cache_helper::get_cachestore_for_locking();
}
}
View
5 cache/classes/lock.php
@@ -115,6 +115,7 @@ public static function reset() {
* Returns an instance of the cache lock class.
*
* @staticvar bool $instance
+ * @param bool $forceregeneration
* @return cache_lock
*/
protected static function instance($forceregeneration = false) {
@@ -157,7 +158,7 @@ public function __destruct() {
/**
* Acquires a lock, of dies trying (jokes).
*
- * Read {@see cache_lock::lock()} for full details.
+ * Read {@link cache_lock::lock()} for full details.
*
* @param string $key
* @param bool $block
@@ -216,7 +217,7 @@ protected function _lock($key, $block = true, $maxlife = null) {
/**
* Releases an acquired lock.
*
- * For more details see {@see cache_lock::unlock()}
+ * For more details see {@link cache_lock::unlock()}
*
* @param string $key
* @param bool $forceunlock If set to true the lock will be removed if it exists regardless of whether or not we own it.
View
2  cache/forms.php
@@ -37,7 +37,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_addinstance_form extends moodleform {
+class cachestore_addinstance_form extends moodleform {
/**
* The definition of the add instance form
View
9 cache/lib.php
@@ -135,6 +135,15 @@ public function has_expired() {
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class cache_exception extends moodle_exception {
+ /**
+ * Constructs a new exception
+ *
+ * @param string $errorcode
+ * @param string $module
+ * @param string $link
+ * @param mixed $a
+ * @param mixed $debuginfo
+ */
public function __construct($errorcode, $module = 'cache', $link = '', $a = NULL, $debuginfo = null) {
parent::__construct($errorcode, $module, $link, $a, $debuginfo);
}
View
60 cache/locallib.php
@@ -105,9 +105,9 @@ public function add_plugin_instance($name, $plugin, array $configuration = array
if (array_key_exists($name, $this->configstores)) {
throw new cache_exception('Duplicate name specificed for cache plugin instance. You must provide a unique name.');
}
- $class = 'cache_store_'.$plugin;
+ $class = 'cachestore_'.$plugin;
if (!class_exists($class)) {
- $plugins = get_plugin_list_with_file('cache', 'lib.php');
+ $plugins = get_plugin_list_with_file('cachestore', 'lib.php');
if (!array_key_exists($plugin, $plugins)) {
throw new cache_exception('Invalid plugin name specified. The plugin either does not exist or is not a valid cache plugin.');
}
@@ -202,11 +202,11 @@ public function edit_plugin_instance($name, $plugin, $configuration) {
if (!array_key_exists($name, $this->configstores)) {
throw new cache_exception('The requested instance does not exist.');
}
- $plugins = get_plugin_list_with_file('cache', 'lib.php');
+ $plugins = get_plugin_list_with_file('cachestore', 'lib.php');
if (!array_key_exists($plugin, $plugins)) {
throw new cache_exception('Invalid plugin name specified. The plugin either does not exist or is not valid.');
}
- $class = 'cache_store_.'.$plugin;
+ $class = 'cachestore_.'.$plugin;
$file = $plugins[$plugin];
if (!class_exists($class)) {
if (file_exists($file)) {
@@ -283,39 +283,39 @@ public static function create_default_configuration() {
'name' => 'default_locking',
'plugin' => 'file',
'configuration' => array(),
- 'features' => cache_store_file::get_supported_features(),
+ 'features' => cachestore_file::get_supported_features(),
'modes' => cache_store::MODE_APPLICATION,
'useforlocking' => true,
'mappingsonly' => true,
'default' => true,
- //'class' => 'cache_store_file'
+ //'class' => 'cachestore_file'
),
'default_application' => array(
'name' => 'default_application',
'plugin' => 'file',
'configuration' => array(),
- 'features' => cache_store_file::get_supported_features(),
+ 'features' => cachestore_file::get_supported_features(),
'modes' => cache_store::MODE_APPLICATION,
'default' => true,
- //'class' => 'cache_store_file'
+ //'class' => 'cachestore_file'
),
'default_session' => array(
'name' => 'default_session',
'plugin' => 'session',
'configuration' => array(),
- 'features' => cache_store_session::get_supported_features(),
+ 'features' => cachestore_session::get_supported_features(),
'modes' => cache_store::MODE_SESSION,
'default' => true,
- //'class' => 'cache_store_session'
+ //'class' => 'cachestore_session'
),
'default_request' => array(
'name' => 'default_request',
'plugin' => 'static',
'configuration' => array(),
- 'features' => cache_store_static::get_supported_features(),
+ 'features' => cachestore_static::get_supported_features(),
'modes' => cache_store::MODE_REQUEST,
'default' => true,
- //'class' => 'cache_store_static'
+ //'class' => 'cachestore_static'
)
);
$writer->configdefinitions = self::locate_definitions();
@@ -539,11 +539,11 @@ public static function get_store_summaries() {
*/
public static function get_plugin_summaries() {
$return = array();
- $plugins = get_plugin_list_with_file('cache', 'lib.php', true);
+ $plugins = get_plugin_list_with_file('cachestore', 'lib.php', true);
foreach ($plugins as $plugin => $path) {
- $class = 'cache_store_'.$plugin;
+ $class = 'cachestore_'.$plugin;
$return[$plugin] = array(
- 'name' => get_string('pluginname', 'cache_'.$plugin),
+ 'name' => get_string('pluginname', 'cachestore_'.$plugin),
'requirementsmet' => $class::are_requirements_met(),
'instances' => 0,
'modes' => array(
@@ -710,19 +710,19 @@ public static function get_plugin_actions($name, array $plugindetails) {
* Returns a form that can be used to add a store instance.
*
* @param string $plugin The plugin to add an instance of
- * @return cache_store_addinstance_form
+ * @return cachestore_addinstance_form
* @throws coding_exception
*/
public static function get_add_store_form($plugin) {
global $CFG; // Needed for includes
- $plugindir = get_plugin_directory('cache', $plugin);
- $class = 'cache_store_addinstance_form';
+ $plugindir = get_plugin_directory('cachestore', $plugin);
+ $class = 'cachestore_addinstance_form';
if (file_exists($plugindir.'/addinstanceform.php')) {
require_once($plugindir.'/addinstanceform.php');
- if (class_exists('cache_store_'.$plugin.'_addinstance_form')) {
- $class = 'cache_store_'.$plugin.'_addinstance_form';
- if (!array_key_exists('cache_store_addinstance_form', class_parents($class))) {
- throw new coding_exception('Cache plugin add instance forms must extend cache_store_addinstance_form');
+ if (class_exists('cachestore_'.$plugin.'_addinstance_form')) {
+ $class = 'cachestore_'.$plugin.'_addinstance_form';
+ if (!array_key_exists('cachestore_addinstance_form', class_parents($class))) {
+ throw new coding_exception('Cache plugin add instance forms must extend cachestore_addinstance_form');
}
}
}
@@ -736,19 +736,19 @@ public static function get_add_store_form($plugin) {
*
* @param string $plugin
* @param string $store
- * @return cache_store_addinstance_form
+ * @return cachestore_addinstance_form
* @throws coding_exception
*/
public static function get_edit_store_form($plugin, $store) {
global $CFG; // Needed for includes
- $plugindir = get_plugin_directory('cache', $plugin);
- $class = 'cache_store_addinstance_form';
+ $plugindir = get_plugin_directory('cachestore', $plugin);
+ $class = 'cachestore_addinstance_form';
if (file_exists($plugindir.'/addinstanceform.php')) {
require_once($plugindir.'/addinstanceform.php');
- if (class_exists('cache_store_'.$plugin.'_addinstance_form')) {
- $class = 'cache_store_'.$plugin.'_addinstance_form';
- if (!array_key_exists('cache_store_addinstance_form', class_parents($class))) {
- throw new coding_exception('Cache plugin add instance forms must extend cache_store_addinstance_form');
+ if (class_exists('cachestore_'.$plugin.'_addinstance_form')) {
+ $class = 'cachestore_'.$plugin.'_addinstance_form';
+ if (!array_key_exists('cachestore_addinstance_form', class_parents($class))) {
+ throw new coding_exception('Cache plugin add instance forms must extend cachestore_addinstance_form');
}
}
}
@@ -772,7 +772,7 @@ public static function get_store_configuration_from_data(stdClass $data) {
throw new coding_exception('Invalid cache plugin provided. '.$file);
}
require_once($file);
- $class = 'cache_store_'.$data->plugin;
+ $class = 'cachestore_'.$data->plugin;
$method = 'config_get_configuration_array';
if (!class_exists($class)) {
throw new coding_exception('Invalid cache plugin provided.');
View
2  cache/renderer.php
@@ -100,7 +100,7 @@ public function store_summariers(array $stores, array $plugins) {
$row = new html_table_row(array(
$storename,
- get_string('pluginname', 'cache_'.$store['plugin']),
+ get_string('pluginname', 'cachestore_'.$store['plugin']),
($store['isready'] && $store['requirementsmet']) ? $this->output->pix_icon('i/tick_green_small', '1') : '',
$store['mappings'],
join(', ', $modes),
View
16 cache/stores/file/addinstanceform.php
@@ -20,7 +20,7 @@
* This file is part of the file cache store, it contains the API for interacting with an instance of the store.
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_file
+ * @package cachestore_file
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -35,7 +35,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_file_addinstance_form extends cache_store_addinstance_form {
+class cachestore_file_addinstance_form extends cachestore_addinstance_form {
/**
* Adds the desired form elements.
@@ -43,17 +43,17 @@ class cache_store_file_addinstance_form extends cache_store_addinstance_form {
protected function configuration_definition() {
$form = $this->_form;
- $form->addElement('text', 'path', get_string('path', 'cache_file'));
+ $form->addElement('text', 'path', get_string('path', 'cachestore_file'));
$form->setType('path', PARAM_SAFEPATH);
- $form->addHelpButton('path', 'path', 'cache_file');
+ $form->addHelpButton('path', 'path', 'cachestore_file');
- $form->addElement('checkbox', 'autocreate', get_string('autocreate', 'cache_file'));
+ $form->addElement('checkbox', 'autocreate', get_string('autocreate', 'cachestore_file'));
$form->setType('autocreate', PARAM_BOOL);
- $form->addHelpButton('autocreate', 'autocreate', 'cache_file');
+ $form->addHelpButton('autocreate', 'autocreate', 'cachestore_file');
$form->disabledIf('autocreate', 'path', 'eq', '');
- $form->addElement('checkbox', 'prescan', get_string('prescan', 'cache_file'));
+ $form->addElement('checkbox', 'prescan', get_string('prescan', 'cachestore_file'));
$form->setType('prescan', PARAM_BOOL);
- $form->addHelpButton('prescan', 'prescan', 'cache_file');
+ $form->addHelpButton('prescan', 'prescan', 'cachestore_file');
}
}
View
2  cache/stores/file/lang/en/cache_file.php → ...e/stores/file/lang/en/cachestore_file.php
@@ -20,7 +20,7 @@
* This file is part of the file cache store, it contains the API for interacting with an instance of the store.
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_file
+ * @package cachestore_file
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
View
12 cache/stores/file/lib.php
@@ -20,7 +20,7 @@
* This file is part of the file cache store, it contains the API for interacting with an instance of the store.
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_file
+ * @package cachestore_file
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -37,7 +37,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_file implements cache_store, cache_is_lockable, cache_is_key_aware {
+class cachestore_file implements cache_store, cache_is_lockable, cache_is_key_aware {
/**
* The name of the store.
@@ -124,7 +124,7 @@ public function __construct($name, array $configuration = array()) {
debugging('The given file cache store path is not writable. '.$path, DEBUG_DEVELOPER);
}
} else {
- $path = make_cache_directory('cache_store_file/'.preg_replace('#[^a-zA-Z0-9\.\-_]+#', '', $name));
+ $path = make_cache_directory('cachestore_file/'.preg_replace('#[^a-zA-Z0-9\.\-_]+#', '', $name));
}
$this->isready = $path !== false;
$this->path = $path;
@@ -581,12 +581,12 @@ public function cleanup() {
* Returns an instance of the cache store, or false if one cannot be created.
*
* @param cache_definition $definition
- * @return cache_store_file
+ * @return cachestore_file
*/
public static function initialise_test_instance(cache_definition $definition) {
$name = 'File test';
- $path = make_cache_directory('cache_store_file_test');
- $cache = new cache_store_file($name, array('path' => $path));
+ $path = make_cache_directory('cachestore_file_test');
+ $cache = new cachestore_file($name, array('path' => $path));
$cache->initialise($definition);
return $cache;
}
View
4 cache/stores/file/version.php
@@ -19,7 +19,7 @@
*
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_file
+ * @package cachestore_file
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -29,4 +29,4 @@
$plugin->version = 2012091000; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2012090700; // Requires this Moodle version
-$plugin->component = 'cache_file'; // Full name of the plugin (used for diagnostics)
+$plugin->component = 'cachestore_file'; // Full name of the plugin (used for diagnostics)
View
8 cache/stores/memcache/addinstanceform.php
@@ -19,7 +19,7 @@
*
* This file is part of the memcache cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_memcache
+ * @package cachestore_memcache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -35,15 +35,15 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_memcache_addinstance_form extends cache_store_addinstance_form {
+class cachestore_memcache_addinstance_form extends cachestore_addinstance_form {
/**
* Add the desired form elements.
*/
protected function configuration_definition() {
$form = $this->_form;
- $form->addElement('textarea', 'servers', get_string('servers', 'cache_memcache'), array('cols' => 75, 'rows' => 5));
- $form->addHelpButton('servers', 'servers', 'cache_memcache');
+ $form->addElement('textarea', 'servers', get_string('servers', 'cachestore_memcache'), array('cols' => 75, 'rows' => 5));
+ $form->addHelpButton('servers', 'servers', 'cachestore_memcache');
$form->addRule('servers', get_string('required'), 'required');
$form->setType('servers', PARAM_RAW);
}
View
2  ...tores/memcache/lang/en/cache_memcache.php → .../memcache/lang/en/cachestore_memcache.php
@@ -19,7 +19,7 @@
*
* This file is part of the memcache cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_memcache
+ * @package cachestore_memcache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
8 cache/stores/memcache/lib.php
@@ -19,7 +19,7 @@
*
* This file is part of the memcache cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_memcache
+ * @package cachestore_memcache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -37,7 +37,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_memcache implements cache_store {
+class cachestore_memcache implements cache_store {
/**
* The name of the store
@@ -349,7 +349,7 @@ public static function initialise_test_instance(cache_definition $definition) {
return false;
}
- $config = get_config('cache_memcache');
+ $config = get_config('cachestore_memcache');
if (empty($config->testservers)) {
return false;
}
@@ -357,7 +357,7 @@ public static function initialise_test_instance(cache_definition $definition) {
$configuration = array();
$configuration['servers'] = explode("\n", $config->testservers);
- $store = new cache_store_memcache('Test memcache', $configuration);
+ $store = new cachestore_memcache('Test memcache', $configuration);
$store->initialise($definition);
return $store;
View
4 cache/stores/memcache/settings.php
@@ -19,11 +19,11 @@
*
* This file is part of the memcache cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_memcache
+ * @package cachestore_memcache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
-$settings->add(new admin_setting_configtextarea('cache_memcache/testservers', new lang_string('testservers', 'cache_memcache'), new lang_string('testservers_desc', 'cache_memcache'), '', PARAM_RAW, 60, 3));
+$settings->add(new admin_setting_configtextarea('cachestore_memcache/testservers', new lang_string('testservers', 'cachestore_memcache'), new lang_string('testservers_desc', 'cachestore_memcache'), '', PARAM_RAW, 60, 3));
View
4 cache/stores/memcache/version.php
@@ -19,7 +19,7 @@
*
* Not to be confused with the memcached plugin.
*
- * @package cache_memcache
+ * @package cachestore_memcache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -28,4 +28,4 @@
$plugin->version = 2012091000; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2012090700; // Requires this Moodle version
-$plugin->component = 'cache_memcache'; // Full name of the plugin (used for diagnostics)
+$plugin->component = 'cachestore_memcache'; // Full name of the plugin (used for diagnostics)
View
28 cache/stores/memcached/addinstanceform.php
@@ -19,7 +19,7 @@
*
* This file is part of the memcached cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_memcached
+ * @package cachestore_memcached
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -35,7 +35,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_memcached_addinstance_form extends cache_store_addinstance_form {
+class cachestore_memcached_addinstance_form extends cachestore_addinstance_form {
/**
* Adds the desired form elements.
@@ -43,33 +43,33 @@ class cache_store_memcached_addinstance_form extends cache_store_addinstance_for
protected function configuration_definition() {
$form = $this->_form;
- $form->addElement('textarea', 'servers', get_string('servers', 'cache_memcached'), array('cols' => 75, 'rows' => 5));
- $form->addHelpButton('servers', 'servers', 'cache_memcached');
+ $form->addElement('textarea', 'servers', get_string('servers', 'cachestore_memcached'), array('cols' => 75, 'rows' => 5));
+ $form->addHelpButton('servers', 'servers', 'cachestore_memcached');
$form->addRule('servers', get_string('required'), 'required');
$form->setType('servers', PARAM_RAW);
- $form->addElement('selectyesno', 'compression', get_string('usecompression', 'cache_memcached'));
- $form->addHelpButton('compression', 'usecompression', 'cache_memcached');
+ $form->addElement('selectyesno', 'compression', get_string('usecompression', 'cachestore_memcached'));
+ $form->addHelpButton('compression', 'usecompression', 'cachestore_memcached');
$form->setDefault('compression', 1);
$form->setType('compression', PARAM_BOOL);
- $form->addElement('select', 'serialiser', get_string('useserialiser', 'cache_memcached'), cache_store_memcached::config_get_serialiser_options());
- $form->addHelpButton('serialiser', 'useserialiser', 'cache_memcached');
+ $form->addElement('select', 'serialiser', get_string('useserialiser', 'cachestore_memcached'), cachestore_memcached::config_get_serialiser_options());
+ $form->addHelpButton('serialiser', 'useserialiser', 'cachestore_memcached');
$form->setDefault('serialiser', Memcached::SERIALIZER_PHP);
$form->setType('serialiser', PARAM_NUMBER);
- $form->addElement('text', 'prefix', get_string('prefix', 'cache_memcached'), array('size' => 16));
+ $form->addElement('text', 'prefix', get_string('prefix', 'cachestore_memcached'), array('size' => 16));
$form->setType('prefix', PARAM_ALPHANUM);
- $form->addHelpButton('prefix', 'prefix', 'cache_memcached');
+ $form->addHelpButton('prefix', 'prefix', 'cachestore_memcached');
- $form->addElement('select', 'hash', get_string('hash', 'cache_memcached'), cache_store_memcached::config_get_hash_options());
- $form->addHelpButton('hash', 'hash', 'cache_memcached');
+ $form->addElement('select', 'hash', get_string('hash', 'cachestore_memcached'), cachestore_memcached::config_get_hash_options());
+ $form->addHelpButton('hash', 'hash', 'cachestore_memcached');
$form->setDefault('serialiser', Memcached::HASH_DEFAULT);
$form->setType('serialiser', PARAM_INT);
- $form->addElement('selectyesno', 'bufferwrites', get_string('bufferwrites', 'cache_memcached'));
- $form->addHelpButton('bufferwrites', 'bufferwrites', 'cache_memcached');
+ $form->addElement('selectyesno', 'bufferwrites', get_string('bufferwrites', 'cachestore_memcached'));
+ $form->addHelpButton('bufferwrites', 'bufferwrites', 'cachestore_memcached');
$form->setDefault('bufferwrites', 0);
$form->setType('bufferwrites', PARAM_BOOL);
}
View
2  ...res/memcached/lang/en/cache_memcached.php → ...emcached/lang/en/cachestore_memcached.php
@@ -19,7 +19,7 @@
*
* This file is part of the memcached cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_memcached
+ * @package cachestore_memcached
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
32 cache/stores/memcached/lib.php
@@ -19,7 +19,7 @@
*
* This file is part of the memcached cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_memcached
+ * @package cachestore_memcached
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -43,7 +43,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_memcached implements cache_store {
+class cachestore_memcached implements cache_store {
/**
* The name of the store
@@ -333,13 +333,13 @@ public function purge() {
*/
public static function config_get_serialiser_options() {
$options = array(
- Memcached::SERIALIZER_PHP => get_string('serialiser_php', 'cache_memcached')
+ Memcached::SERIALIZER_PHP => get_string('serialiser_php', 'cachestore_memcached')
);
if (Memcached::HAVE_JSON) {
- $options[Memcached::SERIALIZER_JSON] = get_string('serialiser_json', 'cache_memcached');
+ $options[Memcached::SERIALIZER_JSON] = get_string('serialiser_json', 'cachestore_memcached');
}
if (Memcached::HAVE_IGBINARY) {
- $options[Memcached::SERIALIZER_IGBINARY] = get_string('serialiser_php', 'cache_memcached');
+ $options[Memcached::SERIALIZER_IGBINARY] = get_string('serialiser_php', 'cachestore_memcached');
}
return $options;
}
@@ -350,15 +350,15 @@ public static function config_get_serialiser_options() {
*/
public static function config_get_hash_options() {
$options = array(
- Memcached::HASH_DEFAULT => get_string('hash_default', 'cache_memcached'),
- Memcached::HASH_MD5 => get_string('hash_md5', 'cache_memcached'),
- Memcached::HASH_CRC => get_string('hash_crc', 'cache_memcached'),
- Memcached::HASH_FNV1_64 => get_string('hash_fnv1_64', 'cache_memcached'),
- Memcached::HASH_FNV1A_64 => get_string('hash_fnv1a_64', 'cache_memcached'),
- Memcached::HASH_FNV1_32 => get_string('hash_fnv1_32', 'cache_memcached'),
- Memcached::HASH_FNV1A_32 => get_string('hash_fnv1a_32', 'cache_memcached'),
- Memcached::HASH_HSIEH => get_string('hash_hsieh', 'cache_memcached'),
- Memcached::HASH_MURMUR => get_string('hash_murmur', 'cache_memcached'),
+ Memcached::HASH_DEFAULT => get_string('hash_default', 'cachestore_memcached'),
+ Memcached::HASH_MD5 => get_string('hash_md5', 'cachestore_memcached'),
+ Memcached::HASH_CRC => get_string('hash_crc', 'cachestore_memcached'),
+ Memcached::HASH_FNV1_64 => get_string('hash_fnv1_64', 'cachestore_memcached'),
+ Memcached::HASH_FNV1A_64 => get_string('hash_fnv1a_64', 'cachestore_memcached'),
+ Memcached::HASH_FNV1_32 => get_string('hash_fnv1_32', 'cachestore_memcached'),
+ Memcached::HASH_FNV1A_32 => get_string('hash_fnv1a_32', 'cachestore_memcached'),
+ Memcached::HASH_HSIEH => get_string('hash_hsieh', 'cachestore_memcached'),
+ Memcached::HASH_MURMUR => get_string('hash_murmur', 'cachestore_memcached'),
);
return $options;
}
@@ -414,7 +414,7 @@ public static function initialise_test_instance(cache_definition $definition) {
return false;
}
- $config = get_config('cache_memcached');
+ $config = get_config('cachestore_memcached');
if (empty($config->testservers)) {
return false;
}
@@ -437,7 +437,7 @@ public static function initialise_test_instance(cache_definition $definition) {
$configuration['bufferwrites'] = $config->testbufferwrites;
}
- $store = new cache_store_memcached('Test memcached', $configuration);
+ $store = new cachestore_memcached('Test memcached', $configuration);
$store->initialise($definition);
return $store;
View
4 cache/stores/memcached/settings.php
@@ -19,11 +19,11 @@
*
* This file is part of the memcached cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_memcached
+ * @package cachestore_memcached
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
-$settings->add(new admin_setting_configtextarea('cache_memcached/testservers', new lang_string('testservers', 'cache_memcached'), new lang_string('testservers_desc', 'cache_memcached'), '', PARAM_RAW, 60, 3));
+$settings->add(new admin_setting_configtextarea('cachestore_memcached/testservers', new lang_string('testservers', 'cachestore_memcached'), new lang_string('testservers_desc', 'cachestore_memcached'), '', PARAM_RAW, 60, 3));
View
4 cache/stores/memcached/version.php
@@ -19,7 +19,7 @@
*
* Not to be confused with the memcache plugin.
*
- * @package cache_memcached
+ * @package cachestore_memcached
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -28,4 +28,4 @@
$plugin->version = 2012091000; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2012090700; // Requires this Moodle version
-$plugin->component = 'cache_memcached'; // Full name of the plugin (used for diagnostics)
+$plugin->component = 'cachestore_memcached'; // Full name of the plugin (used for diagnostics)
View
36 cache/stores/mongodb/addinstanceform.php
@@ -26,7 +26,7 @@
* - usesafe
* - extendedmode
*
- * @package cache_mongodb
+ * @package cachestore_mongodb
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -45,7 +45,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_mongodb_addinstance_form extends cache_store_addinstance_form {
+class cachestore_mongodb_addinstance_form extends cachestore_addinstance_form {
/**
* The forms custom definitions.
@@ -53,45 +53,45 @@ class cache_store_mongodb_addinstance_form extends cache_store_addinstance_form
protected function configuration_definition() {
$form = $this->_form;
- $form->addElement('text', 'server', get_string('server', 'cache_mongodb'), array('size' => 72));
- $form->addHelpButton('server', 'server', 'cache_mongodb');
+ $form->addElement('text', 'server', get_string('server', 'cachestore_mongodb'), array('size' => 72));
+ $form->addHelpButton('server', 'server', 'cachestore_mongodb');
$form->addRule('server', get_string('required'), 'required');
$form->setDefault('server', 'mongodb://127.0.0.1:27017');
$form->setType('server', PARAM_RAW);
- $form->addElement('text', 'database', get_string('database', 'cache_mongodb'));
- $form->addHelpButton('database', 'database', 'cache_mongodb');
+ $form->addElement('text', 'database', get_string('database', 'cachestore_mongodb'));
+ $form->addHelpButton('database', 'database', 'cachestore_mongodb');
$form->addRule('database', get_string('required'), 'required');
$form->setType('database', PARAM_ALPHANUMEXT);
$form->setDefault('database', 'mcache');
- $form->addElement('text', 'username', get_string('username', 'cache_mongodb'));
- $form->addHelpButton('username', 'username', 'cache_mongodb');
+ $form->addElement('text', 'username', get_string('username', 'cachestore_mongodb'));
+ $form->addHelpButton('username', 'username', 'cachestore_mongodb');
$form->setType('username', PARAM_ALPHANUMEXT);
- $form->addElement('text', 'password', get_string('password', 'cache_mongodb'));
- $form->addHelpButton('password', 'password', 'cache_mongodb');
+ $form->addElement('text', 'password', get_string('password', 'cachestore_mongodb'));
+ $form->addHelpButton('password', 'password', 'cachestore_mongodb');
$form->setType('password', PARAM_TEXT);
- $form->addElement('text', 'replicaset', get_string('replicaset', 'cache_mongodb'));
- $form->addHelpButton('replicaset', 'replicaset', 'cache_mongodb');
+ $form->addElement('text', 'replicaset', get_string('replicaset', 'cachestore_mongodb'));
+ $form->addHelpButton('replicaset', 'replicaset', 'cachestore_mongodb');
$form->setType('replicaset', PARAM_ALPHANUMEXT);
$form->setAdvanced('replicaset');
- $form->addElement('checkbox', 'usesafe', get_string('usesafe', 'cache_mongodb'));
- $form->addHelpButton('usesafe', 'usesafe', 'cache_mongodb');
+ $form->addElement('checkbox', 'usesafe', get_string('usesafe', 'cachestore_mongodb'));
+ $form->addHelpButton('usesafe', 'usesafe', 'cachestore_mongodb');
$form->setDefault('usesafe', 1);
$form->setAdvanced('usesafe');
$form->setType('usesafe', PARAM_BOOL);
- $form->addElement('text', 'usesafevalue', get_string('usesafevalue', 'cache_mongodb'));
- $form->addHelpButton('usesafevalue', 'usesafevalue', 'cache_mongodb');
+ $form->addElement('text', 'usesafevalue', get_string('usesafevalue', 'cachestore_mongodb'));
+ $form->addHelpButton('usesafevalue', 'usesafevalue', 'cachestore_mongodb');
$form->disabledIf('usesafevalue', 'usesafe', 'notchecked');
$form->setType('usesafevalue', PARAM_INT);
$form->setAdvanced('usesafevalue');
- $form->addElement('checkbox', 'extendedmode', get_string('extendedmode', 'cache_mongodb'));
- $form->addHelpButton('extendedmode', 'extendedmode', 'cache_mongodb');
+ $form->addElement('checkbox', 'extendedmode', get_string('extendedmode', 'cachestore_mongodb'));
+ $form->addHelpButton('extendedmode', 'extendedmode', 'cachestore_mongodb');
$form->setDefault('extendedmode', 0);
$form->setAdvanced('extendedmode');
$form->setType('extendedmode', PARAM_BOOL);
View
2  .../stores/mongodb/lang/en/cache_mongodb.php → ...es/mongodb/lang/en/cachestore_mongodb.php
@@ -17,7 +17,7 @@
/**
* The language strings for the MongoDB store plugin.
*
- * @package cache_mongodb
+ * @package cachestore_mongodb
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
View
8 cache/stores/mongodb/lib.php
@@ -19,7 +19,7 @@
*
* This file is part of the MongoDB store plugin, it contains the API for interacting with an instance of the store.
*
- * @package cache_mongodb
+ * @package cachestore_mongodb
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -37,7 +37,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_mongodb implements cache_store {
+class cachestore_mongodb implements cache_store {
/**
* The name of the store
@@ -442,7 +442,7 @@ public static function initialise_test_instance(cache_definition $definition) {
return false;
}
- $config = get_config('cache_mongodb');
+ $config = get_config('cachestore_mongodb');
if (empty($config->testserver)) {
return false;
}
@@ -468,7 +468,7 @@ public static function initialise_test_instance(cache_definition $definition) {
$configuration['extendedmode'] = (bool)$config->testextendedmode;
}
- $store = new cache_store_mongodb('Test mongodb', $configuration);
+ $store = new cachestore_mongodb('Test mongodb', $configuration);
$store->initialise($definition);
return $store;
View
4 cache/stores/mongodb/settings.php
@@ -19,11 +19,11 @@
*
* This file is part of the mongodb cache store, it contains the API for interacting with an instance of the store.
*
- * @package cache_mongodb
+ * @package cachestore_mongodb
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
-$settings->add(new admin_setting_configtextarea('cache_mongodb/testserver', new lang_string('testserver', 'cache_mongodb'), new lang_string('testserver_desc', 'cache_mongodb'), '', PARAM_RAW, 60, 3));
+$settings->add(new admin_setting_configtextarea('cachestore_mongodb/testserver', new lang_string('testserver', 'cachestore_mongodb'), new lang_string('testserver_desc', 'cachestore_mongodb'), '', PARAM_RAW, 60, 3));
View
4 cache/stores/mongodb/version.php
@@ -17,7 +17,7 @@
/**
* Cache mongodb store version information.
*
- * @package cache_mongodb
+ * @package cachestore_mongodb
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
@@ -26,4 +26,4 @@
$plugin->version = 2012091000; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2012090700; // Requires this Moodle version
-$plugin->component = 'cache_mongodb'; // Full name of the plugin (used for diagnostics)
+$plugin->component = 'cachestore_mongodb'; // Full name of the plugin (used for diagnostics)
View
2  .../stores/session/lang/en/cache_session.php → ...es/session/lang/en/cachestore_session.php
@@ -20,7 +20,7 @@
* This file is part of the session cache store, it contains the API for interacting with an instance of the store.
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_session
+ * @package cachestore_session
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
View
12 cache/stores/session/lib.php
@@ -20,7 +20,7 @@
* This file is part of the session cache store, it contains the API for interacting with an instance of the store.
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_session
+ * @package cachestore_session
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -34,7 +34,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_session extends session_data_store implements cache_store, cache_is_key_aware {
+class cachestore_session extends session_data_store implements cache_store, cache_is_key_aware {
/**
* The name of the store
@@ -358,7 +358,7 @@ public function cleanup() {
*/
public static function initialise_test_instance(cache_definition $definition) {
// Do something here perhaps.
- $cache = new cache_store_session('Session test');
+ $cache = new cachestore_session('Session test');
$cache->initialise($definition);
return $cache;
}
@@ -387,10 +387,10 @@ public static function initialise_test_instance(cache_definition $definition) {
protected static function &register_store_id($id) {
if (is_null(self::$sessionstore)) {
global $SESSION;
- if (!isset($SESSION->cache_store_session)) {
- $SESSION->cache_store_session = array();
+ if (!isset($SESSION->cachestore_session)) {
+ $SESSION->cachestore_session = array();
}
- self::$sessionstore =& $SESSION->cache_store_session;
+ self::$sessionstore =& $SESSION->cachestore_session;
}
if (!array_key_exists($id, self::$sessionstore)) {
self::$sessionstore[$id] = array();
View
4 cache/stores/session/version.php
@@ -19,7 +19,7 @@
*
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_session
+ * @package cachestore_session
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -29,4 +29,4 @@
$plugin->version = 2012091000; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2012090700; // Requires this Moodle version
-$plugin->component = 'cache_session'; // Full name of the plugin (used for diagnostics)
+$plugin->component = 'cachestore_session'; // Full name of the plugin (used for diagnostics)
View
2  cache/stores/static/lang/en/cache_static.php → ...ores/static/lang/en/cachestore_static.php
@@ -20,7 +20,7 @@
* This file is part of the static cache store, it contains the API for interacting with an instance of the store.
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_static
+ * @package cachestore_static
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
View
6 cache/stores/static/lib.php
@@ -20,7 +20,7 @@
* This file is part of the static cache store, it contains the API for interacting with an instance of the store.
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_static
+ * @package cachestore_static
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -34,7 +34,7 @@
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class cache_store_static extends static_data_store implements cache_store, cache_is_key_aware {
+class cachestore_static extends static_data_store implements cache_store, cache_is_key_aware {
/**
* The name of the store
@@ -358,7 +358,7 @@ public function cleanup() {
*/
public static function initialise_test_instance(cache_definition $definition) {
// Do something here perhaps.
- $cache = new cache_store_static('Static store');
+ $cache = new cachestore_static('Static store');
$cache->initialise($definition);
return $cache;;
}
View
4 cache/stores/static/version.php
@@ -19,7 +19,7 @@
*
* This is used as a default cache store within the Cache API. It should never be deleted.
*
- * @package cache_static
+ * @package cachestore_static
* @category cache
* @copyright 2012 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -29,4 +29,4 @@
$plugin->version = 2012091000; // The current module version (Date: YYYYMMDDXX)
$plugin->requires = 2012090700; // Requires this Moodle version
-$plugin->component = 'cache_static'; // Full name of the plugin (used for diagnostics)
+$plugin->component = 'cachestore_static'; // Full name of the plugin (used for diagnostics)
View
8 cache/testperformance.php
@@ -56,10 +56,10 @@
$struntestable = new lang_string('untestable', 'cache');
$strtested = new lang_string('tested', 'cache');
-foreach (get_plugin_list_with_file('cache', 'lib.php', true) as $plugin => $path) {
+foreach (get_plugin_list_with_file('cachestore', 'lib.php', true) as $plugin => $path) {
- $class = 'cache_store_'.$plugin;
- $plugin = get_string('pluginname', 'cache_'.$plugin);
+ $class = 'cachestore_'.$plugin;
+ $plugin = get_string('pluginname', 'cachestore_'.$plugin);
if (!class_exists($class) || !method_exists($class, 'initialise_test_instance')) {
$applicationtable->data[] = array($plugin, $strinvalidplugin, '-', '-', '-', '-');
@@ -199,4 +199,4 @@
echo $OUTPUT->heading(get_string('storeresults_request', 'cache'));
echo html_writer::table($requesttable);
-echo $OUTPUT->footer();
+echo $OUTPUT->footer();
View
4 cache/tests/cache_test.php
@@ -434,12 +434,12 @@ public function test_distributed_application_event_invalidation() {
// OK data added, data invalidated, and invalidation time has been set.
// Now we need to manually add back the data and adjust the invalidation time.
- $timefile = $CFG->dataroot.'/cache/cache_store_file/default_application/phpunit_eventinvalidationtest/494515064.cache';
+ $timefile = $CFG->dataroot.'/cache/cachestore_file/default_application/phpunit_eventinvalidationtest/494515064.cache';
$timecont = serialize(cache::now() - 60); // Back 60sec in the past to force it to re-invalidate
file_put_contents($timefile, $timecont);
$this->assertTrue(file_exists($timefile));
- $datafile = $CFG->dataroot.'/cache/cache_store_file/default_application/phpunit_eventinvalidationtest/3140056538.cache';
+ $datafile = $CFG->dataroot.'/cache/cachestore_file/default_application/phpunit_eventinvalidationtest/3140056538.cache';
$datacont = serialize("test data 1");
file_put_contents($datafile, $datacont);
$this->assertTrue(file_exists($datafile));
View
2  lib/moodlelib.php
@@ -8011,7 +8011,7 @@ function get_plugin_types($fullpaths=true) {
'qformat' => 'question/format',
'plagiarism' => 'plagiarism',
'tool' => $CFG->admin.'/tool',
- 'cache' => 'cache/stores',
+ 'cachestore' => 'cache/stores',
'theme' => 'theme', // this is a bit hacky, themes may be in $CFG->themedir too
);
View
2  lib/setup.php
@@ -139,7 +139,7 @@
}
// When set to true MUC (Moodle caching) will not use any of the defined or default stores.
-// The Cache API will continue to function however this will force the use of the cache_store_dummy so all requests
+// The Cache API will continue to function however this will force the use of the cachestore_dummy so all requests
// will be interacting with a static property and will never go to the proper cache stores.
// Useful if you need to avoid the stores for one reason or another.
if (!defined('NO_CACHE_STORES')) {
Please sign in to comment.
Something went wrong with that request. Please try again.