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

John Beranek <[email protected]>
Newsgroups gmane.comp.version-control.cvs.viewcvs.user
Organization John@Home
Message-ID <[email protected]>
John Beranek wrote:
> C. Michael Pilato wrote:
>> 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 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?
> 
> Argh, mea culpa! I think I'm suffering from a case of far too many test 
> repositories, and too many tabs in Firefox opened to different views of 
> these repositories in ViewVC.
> 
> Adding to that I was doing queries of a repository while the query 
> database was still building, which would have created false positive 
> caching too I think.
> 
> (In particular, I was doing 'svndbupdate update /my/repos' in the 
> background, but then did a new commit. This was then the latest date 
> returned in the results, and therefore the "last modified date". So, 
> when I redid the query to attempt to find the new results that were 
> being adding to the database by the big 'svndbupdate update' command I 
> didn't see anything, and got confused.
> 
> There, as clear as mud.
> 
> I just did a new commit in this repository and the caching worked 
> flawlessly.

In fact doing further testing of this in Firefox I even saw it reacting 
to the "Cache-Control: max-age=60" that I configured via viewvc.conf. 
Redoing the query less than 60 seconds after the previous query didn't 
perform an HTTP fetch at all.

John.

-- 
John Beranek                         To generalise is to be an idiot.
http://redux.org.uk/                                 -- William Blake

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

To unsubscribe from this discussion, e-mail: [[email protected]].
smime.p7s (application/x-pkcs7-signature, 3.3 KB) - not displayed
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.