Search
Dawn Parzych - Dawn's Blog
You are here: DevCentral > Weblogs

posted on Thursday, December 04, 2008 4:29 AM

A When caching content especially dynamic content it is important to make sure that if content is unique that it not be served as if it is the same for everybody.   Unique content can often be identified by items in the request such as a cookie, query parameter, host or referrer.  With WebAccelerator it is very easy to set up a variation rule to identify what identifies content as unique.  In 95% of cases the default values of the acceleration policy will work however there are times that these values need to be modified.   Below is a listing of the variation rules and the default values for one of the pre-defined policies.  The default value will indicate whether each unique value results in the same content being served or different content being served.

 

Header Value
Host Different
Query Parameter Different
Path Segments Different
Cookies Same
User Agent Same
Referrer Same
Protocol Same
Method Different
All other Headers Same
Client IP Same

Now let's look at some user scenarios to decide whether or not the default values need to be changed.

  1. A site can be accessed from many different host names.  The images on the pages are the same no matter what host name is used to access the site.    Given the default values above if there are 100 different host names then WebAccelerator will cache 100 different versions of the images.  This means 100 copies of logo.gif, 100 copies of blank.gif, etc, not an ideal situation.  Changing the Host parameter so different values of the host define the same content will result in a single object being cached for all requested hosts resulting in a much more efficient use of cache.
  2. An application presents different pages depending on the browser being used.  The type of browser is identified by the User Agent, using the values above will result in a single version of the page being cached which is incorrect.  Modifying the User Agent to specify Different content the application is once again functioning as designed.
  3. A file called config.js exists in multiple different directories in an application.  Although the name is the same the file is different in each directory.  The rules above state that each path segment defines different content therefore nothing needs to be changed,  if the config.js file exists in 5 different locations it will be cached 5 different times as each one is unique.

If your testing reveals that users are getting the wrong content take a look at the variation rules, otherwise no need to worry about them.


Posted In: Acceleration,

Feedback

No comments posted yet.

Let Me Know What You Think


Please use the form below if you have any comments, questions, or suggestions.

Title:
 
Name:
 
Email: (so we can show your gravatar)
Website:
Comment: Allowed tags: blockquote, a, strong, em, p, u, strike, super, sub, code
 
Please add 6 and 7 and type the answer here:

82,243 Members in 102 Countries and Growing!

Join DevCentral Today!

About DevCentral

DevCentral has been a successful, thriving community for many years. We have always strived to bring you the best technical documentation, discussion forums, blogs, media and much more that we can.

So dive in, get familiar with DevCentral. We hope you like it, we hope it makes your job easier, and lets you get that much more power out of the community. To learn more, make sure to check out the Getting Started section. And if you have any problems, or think something could be easier to use, drop us a line to let us know.

Got It !

We've received your comment and transmitted it directly to DevCentral HQ.

Thanks for taking time to let us know what's on your mind. At DevCentral | Community Matters!

Get In Touch With Us

Have questions, suggestions or just want to get something off your chest?

Use our handy form below to Direct Connect with DevCentral Mission Control.

Send Us Feedback       or