Make APICache always update entries correctly.

Review Request #6772 — Created Jan. 14, 2015 and submitted

brennie
RBTools
master
0191017...
rbtools

The APICache now properly updates entries when the Last-Modifed
and/or ETag headers change and the Vary header does not.
Previously, the entries would only be updated if the Vary header
was updated.

Update the MockUrlOpener test harness to compare the provided
If-Modified-Since header against the Last-Modified header.

Added a test for the Cache-Control: no-cacche and Last-Modified
header combination. It makes additional requests after the
Last-Modified header is modified to ensure that the cache entry is
updated correctly.

Updated the test for the Cache-Control: no-cache and ETag header
combination to make another request after the ETag is modified to
verify that the cache entry is updated.

Ran unit tests.

reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbtools/api/tests.py
        rbtools/api/cache.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbtools/api/tests.py
        rbtools/api/cache.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (eba575f)
Loading...