From 8bc1d659b8aabb04c10227ac5ed8d72066e030de Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Tue, 10 Sep 2013 09:53:45 +1200 Subject: [PATCH] MDL-40903 cache: coding style tidyup pre-integration --- cache/classes/definition.php | 9 +++++++-- cache/tests/fixtures/lib.php | 20 -------------------- lib/db/caches.php | 1 - 3 files changed, 7 insertions(+), 23 deletions(-) diff --git a/cache/classes/definition.php b/cache/classes/definition.php index f4d1ea9e44f..9033ea5f229 100644 --- a/cache/classes/definition.php +++ b/cache/classes/definition.php @@ -802,11 +802,16 @@ class cache_definition { * @return bool */ public function should_be_persistent() { + debugging('should_be_persistent has been deprecated please call data_should_be_persistent instead', DEBUG_DEVELOPER); return $this->data_should_be_persistent(); } /** - * Returns true if the cache loader for this definition should be persistent. + * Returns true if we should hold onto the data flowing through the cache. + * + * If set to true data flowing through the cache will be stored in a static variable + * to make subsequent requests for the data much faster. + * * @return bool */ public function data_should_be_persistent() { @@ -939,4 +944,4 @@ class cache_definition { public function has_required_identifiers() { return (count($this->requireidentifiers) > 0); } -} \ No newline at end of file +} diff --git a/cache/tests/fixtures/lib.php b/cache/tests/fixtures/lib.php index d9995834b96..b6d73584220 100644 --- a/cache/tests/fixtures/lib.php +++ b/cache/tests/fixtures/lib.php @@ -251,26 +251,6 @@ class cache_phpunit_application extends cache_application { public function phpunit_get_store_implements() { return class_implements($this->get_store()); } - - /** - * Returns the given key directly from the persistdata cache. - * - * @param string $key - * @return false|mixed - */ - public function phpunit_get_directly_from_persistcache($key) { - $key = $this->parse_key($key); - return $this->get_from_persist_cache($key); - } - - /** - * Returns the cache loaders definition. - * - * @return cache_definition - */ - public function phpunit_get_definition() { - return $this->get_definition(); - } } /** diff --git a/lib/db/caches.php b/lib/db/caches.php index 688b986bbf9..4e4da4e170b 100644 --- a/lib/db/caches.php +++ b/lib/db/caches.php @@ -208,7 +208,6 @@ $definitions = array( // Used to store data for course categories visible to current user. Helps to browse list of categories. 'coursecat' => array( 'mode' => cache_store::MODE_SESSION, - 'persistentdata' => true, 'invalidationevents' => array( 'changesincoursecat', 'changesincourse', -- 2.43.0