CResponse::setCacheControl

The CResponse::setCacheControl function sets the value of the CacheControl property.

int setCacheControl(
chchar * cacheControl // containing the new CacheControl value
);



Return Type

int
Upon successful completion, zero is returned. Otherwise, a value of non-zero is returned.


Parameters

cacheControl
A string that contains the new CacheControl value, which could be Private (by default), Public or no-cache. no-cache is only supported by HTTP/1.1 protocal.


Remarks

This function sets the current value of the CacheControl property of the object. It can be used to override the default value which is Private. By setting the value to Public, proxy servers will be able to cache output from pages; no-cache, the Response message MUST NOT be cached anywhere.

The CResponse::getCacheControl function can be used to retrieves the current value of the CacheControl property of the object.


Differences Between Ch-CGI and Ch-ASP

In Ch-ASP, the parameter of no-cache is not supportted.


See Also

CResponse, CResponse::getCacheControl

Example