You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "Conoly, Brett" <Br...@digitalinsight.com> on 2008/03/31 20:36:08 UTC

webdav caching

Hello all,

            I'm currently running a cocoon server that's accessing parts
of my site through the webdav servlet. Unfortunately the servlet seems
to tell the browser (or http requester, cocoon in this case) to cache
everything that is requested from it.  This is fine for a regular
browser because you can hit refresh to get it to come back with the
updated content.  Unfortunately we cannot tell the cocoon server to
refresh the page because webdav is not telling it that it's dirty.  Is
there any configuration that I'm missing so that I can tell the webdav
servlet to stop telling the browser to cache or at least check if the
file is "dirty" to fix this?

Thanks in advance,

Brett


RE: webdav caching

Posted by "Conoly, Brett" <Br...@digitalinsight.com>.
Yeah, when we initially put our content in we updated the time stamp and
that could be why it doesn't automatically update after subsequent
updates but I'm not completely sure, it could be that the server never
automatically updates the time stamp.  Does anyone know where that may
be documented; I can't seem to find it.
Thanks,
Brett

-----Original Message-----
From: Julian Reschke [mailto:julian.reschke@gmx.de] 
Sent: Tuesday, April 01, 2008 11:04 AM
To: users@jackrabbit.apache.org
Subject: Re: webdav caching

Conoly, Brett wrote:
>> i don't think so.
> You're wrong!
> Sorry don't mean to be rude but it seemed like you were being rude to
> me.  
> 
> In an attempt to give you all the details of our problem we noticed
that
> the headers were returning the original time stamp along with the same
> Etag.  The Etag issue was caused by our Jboss server because the
webdav
> servlet was reading the timestamp off of the node and sending it back
> with the old timestamp.  This was my fault because I thought the time
> stamp would be updated automatically on an update...stupid me.  Once I
> manually added the timestamp on a save the webdav servlet returned the
> correct header which told the browser to return the newly updated
page.
> ...

Are you talking about jcr:lastModified?

JSR-170 doesn't require this property to be protected, but I always 
assumed that servers will actually set it when the content is updated.

Smells like a future interop problem...

BR, Julian

Re: webdav caching

Posted by Julian Reschke <ju...@gmx.de>.
Conoly, Brett wrote:
>> i don't think so.
> You're wrong!
> Sorry don't mean to be rude but it seemed like you were being rude to
> me.  
> 
> In an attempt to give you all the details of our problem we noticed that
> the headers were returning the original time stamp along with the same
> Etag.  The Etag issue was caused by our Jboss server because the webdav
> servlet was reading the timestamp off of the node and sending it back
> with the old timestamp.  This was my fault because I thought the time
> stamp would be updated automatically on an update...stupid me.  Once I
> manually added the timestamp on a save the webdav servlet returned the
> correct header which told the browser to return the newly updated page.
> ...

Are you talking about jcr:lastModified?

JSR-170 doesn't require this property to be protected, but I always 
assumed that servers will actually set it when the content is updated.

Smells like a future interop problem...

BR, Julian

RE: webdav caching

Posted by "Conoly, Brett" <Br...@digitalinsight.com>.
> i don't think so.
You're wrong!
Sorry don't mean to be rude but it seemed like you were being rude to
me.  

In an attempt to give you all the details of our problem we noticed that
the headers were returning the original time stamp along with the same
Etag.  The Etag issue was caused by our Jboss server because the webdav
servlet was reading the timestamp off of the node and sending it back
with the old timestamp.  This was my fault because I thought the time
stamp would be updated automatically on an update...stupid me.  Once I
manually added the timestamp on a save the webdav servlet returned the
correct header which told the browser to return the newly updated page.

As much as I appreciate you trying to help me, please don't if you're
going to automatically assume that the person requesting the help is
making things up!

Brett

-----Original Message-----
From: Angela Schreiber [mailto:anchela@day.com] 
Sent: Tuesday, April 01, 2008 9:50 AM
To: users@jackrabbit.apache.org
Subject: Re: webdav caching

Conoly, Brett wrote:
> [...] but it or something else is
> definitely sending headers telling the client to cache. 

i don't think so.

> Does anyone know if there is a place to configure the servlet to send
a
> "no-cache header"

you can't configure that for it's pretty uncommon that
the server always sends a no-cache header... normally
you want the client to be able to cache things as long
as they haven't changed.

if you want the servlet to ALWAYS send a no-cache header
you have to overwrite the webdav-servlet and make sure
the WebdavResponseImpl constructor is build with the
'noCache'=true -> always send a no-cache header.

> Thanks for the response

welcome
angela


Re: webdav caching

Posted by Angela Schreiber <an...@day.com>.
Conoly, Brett wrote:
> [...] but it or something else is
> definitely sending headers telling the client to cache. 

i don't think so.

> Does anyone know if there is a place to configure the servlet to send a
> "no-cache header"

you can't configure that for it's pretty uncommon that
the server always sends a no-cache header... normally
you want the client to be able to cache things as long
as they haven't changed.

if you want the servlet to ALWAYS send a no-cache header
you have to overwrite the webdav-servlet and make sure
the WebdavResponseImpl constructor is build with the
'noCache'=true -> always send a no-cache header.

> Thanks for the response

welcome
angela


Re: webdav caching

Posted by Julian Reschke <ju...@gmx.de>.
Conoly, Brett wrote:
> Well the servlet itself doesn't cache, but it or something else is
> definitely sending headers telling the client to cache. 
> 
> I guess I should rephrase my question...
> Does anyone know if there is a place to configure the servlet to send a
> "no-cache header" and leave the caching up to the client?
> ...

I think it would be good to know what happens on the wire.

Do you have a trace?

BR, Julian

RE: webdav caching

Posted by "Conoly, Brett" <Br...@digitalinsight.com>.
Well the servlet itself doesn't cache, but it or something else is
definitely sending headers telling the client to cache. 

I guess I should rephrase my question...
Does anyone know if there is a place to configure the servlet to send a
"no-cache header" and leave the caching up to the client?

Thanks for the response

-----Original Message-----
From: Angela Schreiber [mailto:anchela@day.com] 
Sent: Tuesday, April 01, 2008 9:25 AM
To: users@jackrabbit.apache.org
Subject: Re: webdav caching

Conoly, Brett wrote:
> It seems webdav is sending headers to tell the browsers to cache.

that's not true as far as i know but the other way round:
there are some webdav methods (basically deltaV methods) that
are required to send a no-cache header.

the others don't require that header and (as far as i know)
therefore leave the caching behaviour to the client.

> Does anyone know if there is a place to configure the servlet not to
> cache?  

the servlet doesn't cache anyway, does it?
angela




Re: webdav caching

Posted by Angela Schreiber <an...@day.com>.
Conoly, Brett wrote:
> It seems webdav is sending headers to tell the browsers to cache.

that's not true as far as i know but the other way round:
there are some webdav methods (basically deltaV methods) that
are required to send a no-cache header.

the others don't require that header and (as far as i know)
therefore leave the caching behaviour to the client.

> Does anyone know if there is a place to configure the servlet not to
> cache?  

the servlet doesn't cache anyway, does it?
angela




RE: webdav caching

Posted by "Conoly, Brett" <Br...@digitalinsight.com>.
It seems webdav is sending headers to tell the browsers to cache.
Does anyone know if there is a place to configure the servlet not to
cache?  
Details below...

-----Original Message-----
From: Conoly, Brett 
Sent: Monday, March 31, 2008 2:36 PM
To: users@jackrabbit.apache.org
Subject: webdav caching

Hello all,

            I'm currently running a cocoon server that's accessing parts
of my site through the webdav servlet. Unfortunately the servlet seems
to tell the browser (or http requester, cocoon in this case) to cache
everything that is requested from it.  This is fine for a regular
browser because you can hit refresh to get it to come back with the
updated content.  Unfortunately we cannot tell the cocoon server to
refresh the page because webdav is not telling it that it's dirty.  Is
there any configuration that I'm missing so that I can tell the webdav
servlet to stop telling the browser to cache or at least check if the
file is "dirty" to fix this?

Thanks in advance,

Brett