On Nov 30, 2006, at 8:33 PM, Richard Paul wrote:

> Hi Akila,
>
> We don't use apache at all but rather use resin-pro to provide our  
> SSL.
> Thanks for your suggestions, they may be useful in the future, but for
> now I need to know the specifics for Resin.
>
> Can someone confirm my assumptions about using cache-mapping tags for
> static resources are correct?
>
> 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.

Yes, but you're not quite looking at it right.

cache-mapping adds HTTP cache control headers for cacheable  
resources.  In particular, a resource that has an ETag (which is like  
a signature of the file) or Last-Modified is cacheable, but doesn't  
have a max-age assigned to it.  Resin's file servlet only assigns the  
ETag and Last-Modified, but not a max-age.  So cache-mapping can  
assign those values.

Those headers are part of the HTTP spec.

Now, the browser's cache and Resin's proxy cache both follow the HTTP  
spec.  So any configuration you do to control the browser will  
automatically affect Resin's proxy cache in the same way.

So 1) and 2) are not really any different.

-- Scott

>
>
> Regards,
> Richard.
>
> Akila Amarathunga wrote:
>> Hi Richard,
>>
>> I didn't follow the full thread of yours... but for my  
>> understanding I
>> think you need a method to cache..
>> I use apache to use the caching work for resin.. so if you are using
>> apache in front of resin then better to use the mod_expire and
>> mod_header apache modules... it helped me serve pages fast for  
>> dial-up
>> clients. Also use the mod_deflate to save bandwidth.
>>
>> Regards,
>> Akila
>>
>> On Fri, 2006-12-01 at 09:57 +1300, Richard Paul wrote:
>>
>>> 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
>>>
>>>
>>
>>
>> _______________________________________________
>> 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