Hi,

the cache control is not supported in the API now. So you have to add it yourself for now.
I propose to create a Filter which sets the value by
response.getAttributes().get("org.restlet.http.headers").put("Cache-Control", youFormattedCacheControlString);
But perhaps others have a better idea.

best regards
  Stephan

Ludovic chaplin schrieb:
Hello,

I'm using Restlet for serving some static files (img, xsl, css...).
I put all this files in a directory resource :
final Directory root = new Directory(this.getContext(), STATIC_FILE_URI);
    router.attach("/", root);

I would like to add cache control http headers like Expires, Last-Modified... Is there a way to add http header for this files like with the apache mod_header?

Thank you,
Ludovic


Reply via email to