private function simpleWarmUp() {
    // Warm up frequent requests.
    $this->request(['query' => ['classes' => TRUE]]);
    $locations = $this->request(['query' => ['locations' => TRUE]]);

    // Warm up cache for current day for all locations.
    $timezone = new \DateTimeZone($this->configFactory->get('system.date')->get('timezone')['default']);
    $datetime = new \DateTime('today midnight', $timezone);
    $start = $datetime->getTimestamp();
    $end = $datetime->add(new \DateInterval('P1D'))->getTimestamp();
    foreach ($locations as $location) {
      $options = [
        'query' => [
          'schedule' => TRUE,
          'desc' => "true",
          'location' => [(string) $location->id],
          'start' => $start,
          'end' => $end,
        ]
      ];
      $this->request($options);
    }
  }
private function simpleWarmUp() {
    // Warm up frequent requests.
    $this->request(['query' => ['classes' => TRUE]]);
    $locations = $this->request(['query' => ['locations' => TRUE]]);

    // Warm up cache for current day for all locations.
    $timezone = new \DateTimeZone($this->configFactory->get('system.date')->get('timezone')['default']);
    $datetime = new \DateTime('today midnight', $timezone);
    $start = $datetime->getTimestamp();
    $end = $datetime->add(new \DateInterval('P1D'))->getTimestamp();
    foreach ($locations as $location) {
      $options = [
        'query' => [
          'schedule' => TRUE,
          'desc' => "true",
          'location' => [(string) $location->id],
          'start' => $start,
          'end' => $end,
        ]
      ];
      $this->request($options);
    }
  }
private function simpleWarmUp ( ) { // Warm up frequent requests. $ this -> request ( [ 'query' => [ 'classes' => TRUE ] ] ) ; $ locations = $ this -> request ( [ 'query' => [ 'locations' => TRUE ] ] ) ; // Warm up cache for current day for all locations. $ timezone = new \ DateTimeZone ( $ this -> configFactory -> get ( 'system.date' ) -> get ( 'timezone' ) [ 'default' ] ) ; $ datetime = new \ DateTime ( 'today midnight' , $ timezone ) ; $ start = $ datetime -> getTimestamp ( ) ; $ end = $ datetime -> add ( new \ DateInterval ( 'P1D' ) ) -> getTimestamp ( ) ; foreach ( $ locations as $ location ) { $ options = [ 'query' => [ 'schedule' => TRUE , 'desc' => "true" , 'location' => [ ( string ) $ location -> id ] , 'start' => $ start , 'end' => $ end , ] ] ; $ this -> request ( $ options ) ; } }
Warm up simple elements.
Warm up simple elements .