-1

After I perform drush cr on my Drupal site, I open the site via browser and it takes 52 seconds to load, the first time. But if I perform drush cr and then curl https://example.com -from within the site's server- and then I open the site via browser, first of all the curl returns with the site's HTML after 13 seconds and afterwards loading the site from the browser is instant.

So it is much faster to warm the cache via curl first instead of site load via browser. Why is that?

Tasos
  • 1,575
  • 5
  • 18
  • 44

1 Answers1

1

Because of the structure of Drupal. When you made a request via cURL most of process to build the cache layers dont't occurs. Before serve the HTML, Drupal builds all its cache layers, that's why the first time of load is so slow.

https://www.drupal.org/docs/7/managing-site-performance-and-scalability/caching-to-improve-performance/caching-overview

Pipo Bizelli
  • 142
  • 2
  • 11