Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is there any way to exclude some webpage parts from cache? For example, I have Recent Additions block on my homepage which gets refreshed after every 15mins.

I know there is something like ESI Features but don' know if I am going in right direction. If it yes is there any example how to implement it?

I found following three articles regarding ESI

  1. Edge Side Includes integration
  2. Controlling Varnish ESI inside your application
  3. Edge Side Includes with Varnish in 10 minutes
share|improve this question
add comment

1 Answer

ESI is definitely the way to go. You basically need to break your webpage into individual sections, and include them with ESI commands in HTML. Varnish then processes the ESI, and pulls all of the sections together.

The only other way to do it, would be to use Ajax calls to populate the changing bits, and override the cache times for those specific calls.

Varnish itself has some good documentation on this: https://www.varnish-cache.org/docs/3.0/tutorial/esi.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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