Changeset e99140 in indico for indico/web/http_api/handlers.py


Ignore:
Timestamp:
08/23/11 15:38:45 (22 months ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
Children:
a92987
Parents:
4a8797
git-author:
Adrian Moennich <jerome.ernst.monnich@…> (05/04/11 16:53:33)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (08/23/11 15:38:45)
Message:

[IMP] Add no_cache argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/web/http_api/handlers.py

    r787f52 re99140  
    4848    path, query = req.URLFields['PATH_INFO'], req.URLFields['QUERY_STRING'] 
    4949    qdata = parse_qs(query) 
     50    no_cache = get_query_parameter(qdata, ['nc', 'nocache'], 'no') == 'yes' 
     51 
     52    # Copy qdata for the cache key 
    5053    qdata_copy = dict(qdata) 
    51  
    5254    cache = RequestCache() 
    53     obj = cache.loadObject(path, qdata_copy) 
     55    obj = None 
     56    if not no_cache: 
     57        obj = cache.loadObject(path, qdata_copy) 
    5458 
    5559    resp = None 
Note: See TracChangeset for help on using the changeset viewer.