Re: [viewvc-users] Query view is too cache happy?

"C. Michael Pilato" <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization CollabNet, Inc.
Message-ID <4A2FDAA9.1060504__39617.008684627$1244650174$gmane$org@collab.net>
John Beranek wrote:
> Using ViewVC 1.1.1 on a Subversion repository, I was just utterly 
> baffled by returned query results, until I realised the results were 
> just (erroneously) cached.
> 
> I'd earlier done a particular query, and then later come back and done 
> exactly the same query.
> 
> Below is the output from Live HTTP headers performing the query the 
> second time:
> 
> GET 
> /viewvc/svntest2/?view=query&dir=&file=&file_match=exact&who=&who_match=exact&comment=&comment_match=exact&querysort=date&hours=2&date=all&mindate=&maxdate=&limit_changes=100 
> HTTP/1.1
> Host: svn.example.com
> User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.0.10) 
> Gecko/2009042708 Fedora/3.0.10-1.fc10 Firefox/3.0.10
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language: 
> en-gb,en;q=0.9,en-us;q=0.8,de;q=0.6,ja;q=0.5,zh-tw;q=0.4,ko;q=0.3,is;q=0.1
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Connection: keep-alive
> Referer: 
> http://svn.exampe.com/viewvc/svntest2/?comment_match=exact&querysort=date&who_match=exact&hours=2&date=all&limit_changes=100&file_match=exact&view=queryform 
> 
> Cookie: 
> JServSessionIdrootsalorarg1=hi1xbevfp1.qQ5GpR9vq79yahDNmkLJqA5MnN4Iq65xngTDpBfzqATvp3CLbx0Ka0--; 
> ICX_SESSION_ID=wfd-NPp8Ably7u_sTJ50-jCJ:S
> If-Modified-Since: Wed, 10 Jun 2009 10:00:44 GMT
> Authorization: Basic xxxxxxxxxxxxxxxx
> 
> HTTP/1.x 304 Not Modified
> Date: Wed, 10 Jun 2009 14:11:33 GMT
> Server: Apache/2.2.3 (CentOS)
> Connection: close
> Expires: Wed, 10 Jun 2009 14:12:35 GMT
> Cache-Control: max-age=60
> 
> 
> I'm rather confused as to why it would be returning "304 Not Modified" - 
> the Subversion repository in question has definitely changed since 
> 10:00:44 GMT...
> 
> I can provided further information if you like - I'm not sure what else 
> would be helpful so I won't add anything else.
> 
> John.

I see this code in view_query():

  # if we got any results, use the newest commit as the modification time
  if mod_time >= 0:
    if check_freshness(request, mod_time):
      return

mod_time is supposed to be the timestamp of the most recent commit returned
in the commit results.  You said the repos had changed since earlier in the
day, but would those specific query results have returned some of the newer
stuff?

-- 
C. Michael Pilato <[email protected]>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4255&dsMessageId=2360982

To unsubscribe from this discussion, e-mail: [[email protected]].
signature.asc (application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkov2rAACgkQokEGqRcG/W7w4gCgvtgRwAY2mRpVAd2h8LbYxUcl
VqQAn1aJZKCBsYGlzhEWLlIK2G90gQY6
=mtJB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.