Description of the new Caching Proxy directive: CacheMatchLanguage
 Technote (troubleshooting)
 
Problem(Abstract)
Use this directive to solve the problem of returning cache content in a language that is different than the preferred language for the client.
 
Cause
Previously, Caching Proxy did not support caching different languages for the same URL. For example, if customers with a different language preference access the same URL and if the back-end server has the capability of returning language variants to customers, it is possible that a cached page in French might be returned to customers whose language preference is not French.
 
Resolving the problem
Use the CacheMatchLanguage directive to solve this problem.
If you enable the directive, before Caching Proxy loads the cached content it compares the language preference in your Accept-Language request header with the language of the cached content. Caching Proxy also compares the preference distance. If a preference distance is less than a specified limit, it returns the cached copy; otherwise, the proxy forwards the request to the back-end server to get a fresh copy in your requested language.

The syntax of the directive is:

CacheMatchLanguage On language-preference-distance-limit[special-id-for-all-languages]

where --
language preference-distance-limit has a range of (0.001- 0.9999), and
special-id-for-all-languages is a string returned from the server in the Content-Language header to inform the proxy that the response can be used for all language preferences.

Following is a configuration example of the directive, cache object, and the request:

CacheMatchLanguage On 0.2

cache object "/" is in zh_cn

GET / HTTP/1.1
...
Accept-Language: en_US, zh_cn;q=0.7, ja;q=0.3
....

In this request, the customer asks for a page in English (its code and quality is en_US/1.0) if any, then in simplified Chinese (its code and quality is zh_cn/0.7), and the last Japanese (its code and quality is ja/0.3). The cached object is in simplified Chinese, and the preference distance between best expected quality and matched language quality is 1.0 - 0.7 = 0.3. Because the limit is set to 0.2, and 0.3 is greater than 0.2, the proxy asks the server for a new copy of that URL instead of returning the cached object.

If the server does not specify a language or does not specify special-id-for-all-languages in the Content-Language header when it returns a response, and if that response could be cached by the proxy, when the next request comes in, the proxy does not match language preference and returns the cached copy.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Edge Server Caching Proxy AIX, Linux, Solaris, Windows 2000 Edge Server 2.0 PTF2
Application Servers Runtimes for Java Technology Java SDK
 
Historical Number
185865
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Edge Component
Operating system(s): Windows
Software version: 5.1.1
Software edition:
Reference #: 1166400
IBM Group: Software Group
Modified date: Apr 19, 2004