Loading ...
close

Would you like to discuss your environment with a knowledgable engineer?

Preferred communication *

Thank you. We will be in touch with you shortly

User Agent based caching

Posted by on October 25th, 2010

aiCache now has the capability to add User Agent string to signature of cacheable responses.

By default, Aicache uses hostname  and URL of request, possibly sanitized by removing some parameters or discarding the complete query string, as a signature of (pointer to) cached responses.

Some sites might serve different cacheable content in response to requests for same URLs,  depending on a value of a User Agent HTTP header present in the request.

User Agent HTTP Header identifies browser’s make and model.

A site serving mobile clients might serve responses whose formatting depends on exact mobile device/browser. To accommodate for such clients, while allowing for caching of responses, we must use User Agent information as part of cached response signature.

When a URL named “news.html” is accessed by 3 different mobile devices, we shall have 3 different responses cached – each containing mobile device’s User Agent string.

To enable such behavior, you can specify sig_ua setting  in website section of the configuration file.

All of the cacheable requests for to the  website shall now have User Agent information appended to their signatures – you can see that when you run CLI inventory command or its derivatives (sit, sir, sis, sif).

Tthis feature has potential to significantly increase the size  of response cache (as multiple versions of same URLs are now cached), so we recommend using it only when necessary.

Excellent for accommodating mobile clients.

You can also combine sig_ua and sig_cookie (see admin guide) settings – in which case both the selected cookie value and User Agent string are used as part of signature. In this case it is the User Agent string that becomes the signature’s suffix.

Press

Leave Comment

US (208) 948-9786‬   EU ‭+31 621302365