0

We have noticed that a page opened for the first time is loading longer (from 8s), than a second time (1-3s). If the same page is loaded on a different computer for the first time on that computer (so no local cache exist yet), the page is also loaded faster (1-3s). So my question: why is the first load of a page so long (from 8s)?

I have another question: how does full page cache in magento 2 work?

Magento 2.0.8, Apache 2.2, php 7.0.7, Mysql 5.6.

Thank you

3

The answer to your first question is already in your title: Full page cache. Maybe this can already help you.
Full page caching means, that on requesting a page, Magento 2 saves what it sent to you. Your browser will save this too, but what makes Magento 2 faster on the other computer, is what Magento has saved internally.
For example: If you are asked a question, and you look up an answer, you will need some time. If then another person asks you the same question, you will already know the answer and you can reply faster, because you still have it in your memory and you do not need to research it again.
Magento does the exact same thing.
I hope I was able to help.

  • Ok, thank you. How do we make Magento save everything internally so it doesn't wait for another user to open it. – Fabler Aug 9 '16 at 6:14
  • I'm sorry, but I'm not sure I got your question. Magento does not wait for anyone. It saves the content/answer to your request, in case someone else needs the same page/content/answer again. It does this completely independent and you normally should not need to worry about it. – M47z3 Aug 9 '16 at 6:22
  • If you want to speed up Magento, the production mode, the CLI commands magento setup:di:compile and magento setup:static-content:deploy are things you might be interested in. These "prepare" some of the things that will be compiled ("reasearched") before someone even asked for them. I hope I got your question right. – M47z3 Aug 9 '16 at 6:26
  • I was wondering how to make Magento create the full page caches, before any users try to open the pages so they get the faster response (the saved content/answer). – Fabler Aug 9 '16 at 6:26
  • See my last commnt. You need to understand, that not everything can be cached and reused later. Some content changes for the next request. For example if different customers have different products in their cart, the cart page needs to look different (showing the right products) or when you make product changes, you want your customer to see the most resent version of your product description/attributes. – M47z3 Aug 9 '16 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.