Home

Traffic Server Software Developers Kit

INKCacheKeyHostNameSet

Associates a host name to a cache key. Use if you want to support cache partitioning by host name.

Prototype

INKReturnCode INKCacheKeyHostNameSet(INKCacheKey key, const unsigned char *hostname, int host_len;

Arguments

INKCacheKey key is the key to the cached object.

const unsigned char *hostname is the host name you are associating with the cache key.

int host_len is the length of the string hostname.

Description

Associates a host name to a cache key. The host name setting is used in conjunction with the Traffic Server configuration files partition.config and hosting.config that enable you to specify under which cache partition the object should be stored.

Returns

INK_SUCCESS if the hostname is successfully associated with the cache key.

INK_ERROR if hostname cannot be set or is invalid.