Fragment caching and page caching

I am wondering how fragment caching is versus page caching. Obviously, caching the entire page will be much faster since it can be passed by the web server without involving rails, but how much slower is fragment caching?

Let's say, for example, that I have a shopping cart application and in the header it needs to display the number of items in your cart.

I could cache the entire page and use JS and cookies to make the header look dynamic, or I could fragment the cache of everything but the header.

Right now, with full page caching, my load tests show about 70ms per request, about 7000 requests per minute.

I know there are no absolutes in this, but could anyone have guessed what type of hit I would take with the cache fragment approach?

thank

+3


source to share





All Articles