So just to clarify, the cache-mapping does two things.
1) Adds expires attributes to the files being sent to allow the browser
to cache them.
2) Adds the files to an in memory cache on the server to reduce disk usage.

In our particular case we have a single server (no fancy load balancing)
that is SSL only and the only files I want to cache are images, css and
javascript.  I'm guessing a slight performance gain would be achieved as
the server does not have to load the resources from disk on the user's
initial request.  On subsequent requests the server would not need to
check the files on disk to see if they have changed before sending 'Not
Modified' to the browser.  Is this correct?

If a resource changes on the disk (e.g. a hot fix is required to a css
or javascript file) will the cache be updated or will the old resource
continue to be cached until the time specified in the expires tag?

Thanks in advance,
Richard.

Scott Ferguson wrote:
> On Nov 30, 2006, at 8:27 AM, Riccardo Cohen wrote:
>
>   
>> I think I made a mistake.
>> There is no link between browser cache and server cache. If the  
>> browser decide to suppress
>> caching in https, I still can set caching on the server, that will  
>> optimize disk access on
>> the server. So keeping <cache-mapping> is still a good idea, even  
>> on https.
>>
>> Am I right ?
>>     
>
> That's correct.
>
> For example, if you were using Resin as a web-server/load-balancer,  
> then the <cache-mapping> would cache content on the front-end web- 
> server, saving traffic to the backend servers.
>
> -- Scott
>
>   
>> Riccardo Cohen wrote:
>>     
>>> thanks for the information ! I'll simply remove the cache from my  
>>> "full https" app !
>>>
>>> Richard Paul wrote:
>>>       
>>>> Ignore this request, Firefox has caching disable by default for ssl
>>>> connections.
>>>> In about:config you can set the value for  
>>>> "browser.cache.disk_cache_ssl"
>>>> to true to enable the ssl cache.
>>>>
>>>> Richard Paul wrote:
>>>>         
>>>>> Hi,
>>>>>
>>>>> I am attempting to set the browser's expires value for our  
>>>>> static resources.
>>>>> I have added the following to resin.conf under web-app-default:
>>>>>
>>>>>       <cache-mapping url-pattern="*.gif" expires="7D"/>
>>>>>       <cache-mapping url-pattern="*.png" expires="7D"/>
>>>>>       <cache-mapping url-pattern="*.jpg" expires="7D"/>
>>>>>       <cache-mapping url-pattern="*.swf" expires="7D"/>
>>>>>       <cache-mapping url-pattern="*.js" expires="1D"/>
>>>>>
>>>>> When using HTTP the expires value is set correctly, but when  
>>>>> using HTTPS
>>>>> no expires value is set causing the resource not to be cached.
>>>>> Is this a bug or am I missing a configuration option?
>>>>>
>>>>> I have tried this on resin-pro-3.0.19 and resin-pro-3.0.22.
>>>>> Suse linux 10.0, Java 1.5.
>>>>>
>>>>> Thanks in advance,
>>>>> Richard.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> resin-interest mailing list
>>>>> resin-interest@caucho.com
>>>>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>>>>>
>>>>>           
>>>> _______________________________________________
>>>> resin-interest mailing list
>>>> resin-interest@caucho.com
>>>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>>>>
>>>>         
>> -- 
>> Très cordialement,
>>
>> Riccardo Cohen
>> ligne directe : 02-47-49-63-24
>> -------------------------------------------
>> Articque
>> http://www.articque.com
>> Moulin des Roches
>> 37230 Fondettes - France
>> tel : 02-47-49-90-49
>> fax : 02-47-49-91-49
>>
>> _______________________________________________
>> resin-interest mailing list
>> resin-interest@caucho.com
>> http://maillist.caucho.com/mailman/listinfo/resin-interest
>>     
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>   


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to