hi,

I'm playing around with my subclasses of repository - changeset -
node.
Now one thing is annoying. Once I have implemented everything so I can
click on a changeset and go to source page without raising any errors
that page is cached. so whatever I do to the source code to change
the
way my changeset looks the same page appears.

now I outcommented the last lines in the web/api.py check_modified()
method to get rid of this caching. but is there a way to just simply
clear?



def check_modified(self, datetime, extra=''):
"""Check the request "If-None-Match" header against an entity tag.
The entity tag is generated from the specified last modified time
(`datetime`), optionally appending an `extra` string to
indicate variants of the requested resource.
That `extra` parameter can also be a list, in which case the MD5 sum
of the list content will be used.
If the generated tag matches the "If-None-Match" header of the
request,
this method sends a "304 Not Modified" response to the client.
Otherwise, it adds the entity tag as an "ETag" header to the response
so that consecutive requests can be cached.
"""
if isinstance(extra, list):
m = md5()
for elt in extra:
m.update(repr(elt))
extra = m.hexdigest()
etag = 'W/"%s/%s/%s"' % (self.authname, http_date(datetime), extra)
inm = self.get_header('If-None-Match')
print('check_modified')
print(etag)
print(inm)
if (not inm or inm != etag):
self.send_header('ETag', etag)
#else:
#self.send_response(304)
#self.send_header('Content-Length', 0)
#self.end_headers()
#raise RequestDone

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to