First, this fixes caching to be testable. The old way didn't work because our cache object was global. It would get configured by the first test and then never be reconfigurable for other tests. This gets fixed here by hanging the cache region on flask.current_app so that it gets reinstantiated and reconfigured for each test run (and each WSGI process).
~~Second, this introduces a CacheInvalidatorExtraordinaire consumer that does the active cache invalidation stuff from #77. So far, only for resultsdb.~~ The cache invalidation now happens as part of the first step in the resultsdb handler, to ensure that cache invalidation is complete before any decision changes are evaluated or published.
First, this fixes caching to be testable. The old way didn't work because our
cacheobject was global. It would get configured by the first test and then never be reconfigurable for other tests. This gets fixed here by hanging the cache region onflask.current_appso that it gets reinstantiated and reconfigured for each test run (and each WSGI process).~~Second, this introduces a
CacheInvalidatorExtraordinaireconsumer that does the active cache invalidation stuff from #77. So far, only for resultsdb.~~ The cache invalidation now happens as part of the first step in the resultsdb handler, to ensure that cache invalidation is complete before any decision changes are evaluated or published.