MDL-36111 cache: Fixed up typo's and trivial issues

This commit is contained in:
Sam Hemelryk 2012-11-12 10:36:53 +13:00
parent 8ccaa296fa
commit 758dbdf894
11 changed files with 30 additions and 24 deletions

View file

@ -209,7 +209,7 @@ class cachestore_file implements cache_store, cache_is_key_aware {
*
* @return bool
*/
public function supports_multiple_indentifiers() {
public function supports_multiple_identifiers() {
return false;
}
@ -255,8 +255,11 @@ class cachestore_file implements cache_store, cache_is_key_aware {
* Pre-scan the cache to see which keys are present.
*/
protected function prescan_keys() {
foreach (glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT) as $filename) {
$this->keys[basename($filename)] = filemtime($filename);
$files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);
if (is_array($files)) {
foreach ($files as $filename) {
$this->keys[basename($filename)] = filemtime($filename);
}
}
}
@ -510,8 +513,11 @@ class cachestore_file implements cache_store, cache_is_key_aware {
* @return boolean True on success. False otherwise.
*/
public function purge() {
foreach (glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT) as $filename) {
@unlink($filename);
$files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);
if (is_array($files)) {
foreach ($files as $filename) {
@unlink($filename);
}
}
$this->keys = array();
return true;

View file

@ -178,7 +178,7 @@ class cachestore_memcache implements cache_store {
*
* @return bool
*/
public function supports_multiple_indentifiers() {
public function supports_multiple_identifiers() {
return false;
}

View file

@ -204,7 +204,7 @@ class cachestore_memcached implements cache_store {
*
* @return bool
*/
public function supports_multiple_indentifiers() {
public function supports_multiple_identifiers() {
return false;
}

View file

@ -230,7 +230,7 @@ class cachestore_mongodb implements cache_store {
* Returns true if this store is making use of multiple identifiers.
* @return bool
*/
public function supports_multiple_indentifiers() {
public function supports_multiple_identifiers() {
return $this->extendedmode;
}

View file

@ -127,7 +127,7 @@ class cachestore_session extends session_data_store implements cache_store, cach
*
* @return bool
*/
public function supports_multiple_indentifiers() {
public function supports_multiple_identifiers() {
return false;
}

View file

@ -127,7 +127,7 @@ class cachestore_static extends static_data_store implements cache_store, cache_
*
* @return bool
*/
public function supports_multiple_indentifiers() {
public function supports_multiple_identifiers() {
return false;
}