Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(424)

Issue 183129: Don't cache failed fetches in spec caches (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 8 months ago by johnfargo
Modified:
15 years, 8 months ago
Reviewers:
shindig.remailer
Base URL:
http://svn.apache.org/repos/asf/incubator/shindig/trunk/
Visibility:
Public.

Description

Slightly modifies AbstractSpecFactory behavior to avoid caching GadgetException in the (local) spec cache when the RequestPipeline returns a non-SC_OK result. Rationale: A RequestPipeline may serve the same spec in two different ways (namely, OK vs. not-OK) depending on additional request context, such as the user's IP or other contextual information. It will similarly perform its own HttpCaching logic, in particular performing negative caching for non-OK results. Caching exceptions in the spec cache has the main value of avoiding re-parsing of known-faulty specs. Caching a fetch exception is simply duplicative of the HttpCache's spec while making subtle RequestPipeline-focused logic more difficult to implement. As such, I'm removing this caching behavior. Test added to DefaultGadgetSpecFactoryTest for simplicity. Turns out one test in it was misnamed anyway, so was repurposed.

Patch Set 1 #

Patch Set 2 : Tweaking the test a bit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -9 lines) Patch
java/gadgets/src/main/java/org/apache/shindig/gadgets/AbstractSpecFactory.java View 3 chunks +21 lines, -2 lines 0 comments Download
java/gadgets/src/test/java/org/apache/shindig/gadgets/DefaultGadgetSpecFactoryTest.java View 1 1 chunk +11 lines, -7 lines 0 comments Download

Messages

Total messages: 2
johnfargo
15 years, 8 months ago (2010-01-06 18:59:59 UTC) #1
johnfargo
15 years, 8 months ago (2010-01-06 19:05:25 UTC) #2
Tweaking the test a bit.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b