mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-36111 cache: Fixed up typo's and trivial issues
This commit is contained in:
parent
8ccaa296fa
commit
758dbdf894
11 changed files with 30 additions and 24 deletions
16
cache/stores/file/lib.php
vendored
16
cache/stores/file/lib.php
vendored
|
@ -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;
|
||||
|
|
2
cache/stores/memcache/lib.php
vendored
2
cache/stores/memcache/lib.php
vendored
|
@ -178,7 +178,7 @@ class cachestore_memcache implements cache_store {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function supports_multiple_indentifiers() {
|
||||
public function supports_multiple_identifiers() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
2
cache/stores/memcached/lib.php
vendored
2
cache/stores/memcached/lib.php
vendored
|
@ -204,7 +204,7 @@ class cachestore_memcached implements cache_store {
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function supports_multiple_indentifiers() {
|
||||
public function supports_multiple_identifiers() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
2
cache/stores/mongodb/lib.php
vendored
2
cache/stores/mongodb/lib.php
vendored
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
2
cache/stores/session/lib.php
vendored
2
cache/stores/session/lib.php
vendored
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
2
cache/stores/static/lib.php
vendored
2
cache/stores/static/lib.php
vendored
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue