A.D.F. wrote, On 03/12/2007 17:12:
> Alvaro Lopez Ortega wrote:
>> Stefan de Konink wrote, On 03/12/2007 08:16:
>>
>> > In read_config_grammer.y I found:
>> >
>> > mimetype_options : T_MAX_AGE T_NUMBER
>> > {
>> > cherokee_mime_entry_set_maxage (current_mime_entry, $2);
>> > };
>> >
>> >
>> > Does this need to be set in the mimes.types file? Or somewhere else?
>> > Do you have an example for this?
>>
>> That is something that only works with Cherokee 0.5. We switched from
>> using a Cherokee specific mime types file (0.5) to the system wide
>> file (0.6), and therefore we lost the ability to specify the Max Age
>> header within the file.
>>
>> I would like to address in 0.6 this right after 0.6.0 is released.
>> The idea is to use the Max-Age as a property of directories, requests
>> and extensions.
>
> Alvaro, do you think it is worthwhile to start by adding
> a global parameter for the entire server ?
>
> server!max_age = 300
>
> This could be useful to set a default max-age for the whole server
> instead of adding it to each mime type that can be served
> (some web masters like to use a whole machine to serve
> static files only).
>
>
> In the near future we could add it to virtual server entries too:
>
> vserver!default!max_age = 600
>
>
> then to mime types, i.e.:
>
> vserver!default!mime_type!image/jpeg!max_age = 500
> vserver!default!mime_type!image/gif!max_age = 800
>
>
> and finally to single directories, i.e.:
>
> vserver!default!directory!/images!max_age = 86400
>
>
> If you think it is not too odd, max-age could be added
> to mime.types file too (i.e. an extension that does not
> start with . (i.e. .jpeg, .gif, etc.)
> and it is a number then it is read as a max-age value.
>
> By this way max-age could be set globally per mime-type
> at almost no-cost.
My original idea was to integrate it as a property of the configuration
entries (directories, extensions and requests). For instance:
vserver!default!directory!/icons!max_age = 500
or
vserver!default!extensions!xml!max_age = 500
What would you think of that?
--
Greetings, alo.
http://www.alobbs.com
_______________________________________________
Cherokee mailing list
[email protected]
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee