Make APICache always update entries correctly.
Review Request #6772 — Created Jan. 14, 2015 and submitted
The
APICachenow properly updates entries when theLast-Modifed
and/orETagheaders change and theVaryheader does not.
Previously, the entries would only be updated if theVaryheader
was updated.Update the
MockUrlOpenertest harness to compare the provided
If-Modified-Sinceheader against theLast-Modifiedheader.Added a test for the
Cache-Control: no-caccheandLast-Modified
header combination. It makes additional requests after the
Last-Modifiedheader is modified to ensure that the cache entry is
updated correctly.Updated the test for the
Cache-Control: no-cacheandETagheader
combination to make another request after theETagis modified to
verify that the cache entry is updated.
Ran unit tests.
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