public function get($key, $default = null)
    {
        $location = trim($this->config->get('mpesa.cache_location'), '/') . '/.mpc';

        if (! is_file($location)) {
            return $default;
        }

        $cache = unserialize(file_get_contents($location));
        $cache = $this->cleanCache($cache, $location);

        if (! isset($cache[$key])) {
            return $default;
        }

        return $cache[$key]['v'];
    }
public function get($key, $default = null)
    {
        $location = trim($this->config->get('mpesa.cache_location'), '/') . '/.mpc';

        if (! is_file($location)) {
            return $default;
        }

        $cache = unserialize(file_get_contents($location));
        $cache = $this->cleanCache($cache, $location);

        if (! isset($cache[$key])) {
            return $default;
        }

        return $cache[$key]['v'];
    }
public function get ( $ key , $ default = null ) { $ location = trim ( $ this -> config -> get ( 'mpesa.cache_location' ) , '/' ) . '/.mpc' ; if ( ! is_file ( $ location ) ) { return $ default ; } $ cache = unserialize ( file_get_contents ( $ location ) ) ; $ cache = $ this -> cleanCache ( $ cache , $ location ) ; if ( ! isset ( $ cache [ $ key ] ) ) { return $ default ; } return $ cache [ $ key ] [ 'v' ] ; }
Get the cache value.

@param      $key
@param null $default

@return mixed|null
Get the cache value .