protected function globalThrottle()
    {
        // check if global throttling is turned on
        if (config('laravelEmailExceptions.ErrorEmail.globalThrottle') == false) {
            // no need to throttle since global throttling has been disabled
            return false;
        } else {
            // if we have a cache key lets determine if we are over the limit or not
            if (Cache::store(
                config('laravelEmailExceptions.ErrorEmail.throttleCacheDriver')
            )->has($this->globalThrottleCacheKey)
            ) {
                // if we are over the limit return true since this should be throttled
                if (Cache::store(
                    config('laravelEmailExceptions.ErrorEmail.throttleCacheDriver')
                )->get(
                    $this->globalThrottleCacheKey,
                    0
                ) >= config('laravelEmailExceptions.ErrorEmail.globalThrottleLimit')
                ) {
                    return true;
                } else {
                    // else lets increment the cache key and return false since its not time to throttle yet
                    Cache::store(
                        config('laravelEmailExceptions.ErrorEmail.throttleCacheDriver')
                    )->increment($this->globalThrottleCacheKey);

                    return false;
                }
            } else {
                // we didn't find an item in cache lets put it in the cache
                Cache::store(
                    config('laravelEmailExceptions.ErrorEmail.throttleCacheDriver')
                )->put(
                    $this->globalThrottleCacheKey,
                    1,
                    $this->getDateTimeMinutesFromNow(
                        config('laravelEmailExceptions.ErrorEmail.globalThrottleDurationMinutes')
                    )
                );

                // if we're just making the cache key now we are not global throttling yet
                return false;
            }
        }
    }
protected function globalThrottle()
    {
        // check if global throttling is turned on
        if (config('laravelEmailExceptions.ErrorEmail.globalThrottle') == false) {
            // no need to throttle since global throttling has been disabled
            return false;
        } else {
            // if we have a cache key lets determine if we are over the limit or not
            if (Cache::store(
                config('laravelEmailExceptions.ErrorEmail.throttleCacheDriver')
            )->has($this->globalThrottleCacheKey)
            ) {
                // if we are over the limit return true since this should be throttled
                if (Cache::store(
                    config('laravelEmailExceptions.ErrorEmail.throttleCacheDriver')
                )->get(
                    $this->globalThrottleCacheKey,
                    0
                ) >= config('laravelEmailExceptions.ErrorEmail.globalThrottleLimit')
                ) {
                    return true;
                } else {
                    // else lets increment the cache key and return false since its not time to throttle yet
                    Cache::store(
                        config('laravelEmailExceptions.ErrorEmail.throttleCacheDriver')
                    )->increment($this->globalThrottleCacheKey);

                    return false;
                }
            } else {
                // we didn't find an item in cache lets put it in the cache
                Cache::store(
                    config('laravelEmailExceptions.ErrorEmail.throttleCacheDriver')
                )->put(
                    $this->globalThrottleCacheKey,
                    1,
                    $this->getDateTimeMinutesFromNow(
                        config('laravelEmailExceptions.ErrorEmail.globalThrottleDurationMinutes')
                    )
                );

                // if we're just making the cache key now we are not global throttling yet
                return false;
            }
        }
    }
protected function globalThrottle ( ) { // check if global throttling is turned on if ( config ( 'laravelEmailExceptions.ErrorEmail.globalThrottle' ) == false ) { // no need to throttle since global throttling has been disabled return false ; } else { // if we have a cache key lets determine if we are over the limit or not if ( Cache :: store ( config ( 'laravelEmailExceptions.ErrorEmail.throttleCacheDriver' ) ) -> has ( $ this -> globalThrottleCacheKey ) ) { // if we are over the limit return true since this should be throttled if ( Cache :: store ( config ( 'laravelEmailExceptions.ErrorEmail.throttleCacheDriver' ) ) -> get ( $ this -> globalThrottleCacheKey , 0 ) >= config ( 'laravelEmailExceptions.ErrorEmail.globalThrottleLimit' ) ) { return true ; } else { // else lets increment the cache key and return false since its not time to throttle yet Cache :: store ( config ( 'laravelEmailExceptions.ErrorEmail.throttleCacheDriver' ) ) -> increment ( $ this -> globalThrottleCacheKey ) ; return false ; } } else { // we didn't find an item in cache lets put it in the cache Cache :: store ( config ( 'laravelEmailExceptions.ErrorEmail.throttleCacheDriver' ) ) -> put ( $ this -> globalThrottleCacheKey , 1 , $ this -> getDateTimeMinutesFromNow ( config ( 'laravelEmailExceptions.ErrorEmail.globalThrottleDurationMinutes' ) ) ) ; // if we're just making the cache key now we are not global throttling yet return false ; } } }
check if we need to globally throttle the exception

@return bool
@throws Exception
check if we need to globally throttle the exception