X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Fincludes%2Fcache.inc;h=3f9265b37e6f99bf0c4e7cd573d63aeca7dfeabe;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=8f62193832449dda9f2f599eb49be907b533ce07;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/vendor/drush/drush/includes/cache.inc b/vendor/drush/drush/includes/cache.inc index 8f6219383..3f9265b37 100644 --- a/vendor/drush/drush/includes/cache.inc +++ b/vendor/drush/drush/includes/cache.inc @@ -11,6 +11,7 @@ * option in drushrc.php. */ +use Drush\Drush; use Drush\Log\LogLevel; /** @@ -72,7 +73,7 @@ function _drush_cache_get_object($bin) { function drush_cache_get($cid, $bin = 'default') { $ret = _drush_cache_get_object($bin)->get($cid); $mess = $ret ? "HIT" : "MISS"; - drush_log(dt("Cache !mess cid: !cid", array('!mess' => $mess, '!cid' => $cid)), LogLevel::DEBUG); + drush_log(dt("Cache !mess cid: !cid", ['!mess' => $mess, '!cid' => $cid]), LogLevel::DEBUG); return $ret; } @@ -115,7 +116,7 @@ function drush_cache_get_multiple(array &$cids, $bin = 'default') { */ function drush_cache_set($cid, $data, $bin = 'default', $expire = DRUSH_CACHE_PERMANENT) { $ret = _drush_cache_get_object($bin)->set($cid, $data, $expire); - if ($ret) drush_log(dt("Cache SET cid: !cid", array('!cid' => $cid)), LogLevel::DEBUG); + if ($ret) drush_log(dt("Cache SET cid: !cid", ['!cid' => $cid]), LogLevel::DEBUG); return $ret; } @@ -166,8 +167,9 @@ function _drush_cache_is_empty($bin) { * Return drush cache bins and any bins added by hook_drush_flush_caches(). */ function drush_cache_get_bins() { - $drush = array('default'); - return array_merge(drush_command_invoke_all('drush_flush_caches'), $drush); + $drush = ['default']; + return $drush; + // return array_merge(drush_command_invoke_all('drush_flush_caches'), $drush); } /** @@ -183,8 +185,8 @@ function drush_cache_get_bins() { * @return * A cache id string. */ -function drush_get_cid($prefix, $contexts = array(), $params = array()) { - $cid = array(); +function drush_get_cid($prefix, $contexts = [], $params = []) { + $cid = []; foreach ($contexts as $context) { $c = drush_get_context($context); @@ -197,5 +199,5 @@ function drush_get_cid($prefix, $contexts = array(), $params = array()) { $cid[] = $param; } - return DRUSH_VERSION . '-' . $prefix . '-' . md5(implode("", $cid)); + return Drush::getVersion() . '-' . $prefix . '-' . md5(implode("", $cid)); }