Caching is an important aspect of web scripts and is often required to support high-load applications such as websites backed by Content Services. You should consider caching when developing web scripts.
This task demonstrates cache controls by creating a sample web script that sets the last modified date.
The returned response is similar to the following, where the
Cache-Control and Last-Modified headers are
present:
* About to connect() to localhost port 8080 (#0) * Trying ::1... connected * Connected to localhost (::1) port 8080 (#0) * Server auth using Basic with user ‘admin’ > GET /alfresco/service/cache HTTP/1.1 > Authorization: Basic YWRtaW46YWRtaW4= > Host: localhost:8080 > Accept: */* > < HTTP/1.1 200 OK < Server: Apache-Coyote/1.1 < Cache-Control: must-revalidate < Last-Modified: Tue, 02 Feb 2010 09:07:05 GMT < Content-Type: text/html;charset=UTF-8 < Content-Length: 16 < Date: Tue, 02 Feb 2010 09:07:05 GMT