I don't think there's currently a test case for BasicRemoteContentFetcher. I
probably overlooked it myself because I don't use the basic fetcher in my
own deployments.

We'd probably need to add one under
src/java/org/apache/shindig/gadgets/BasicRemoteContentFetcherTest.java

On Wed, Apr 9, 2008 at 1:36 PM, Santiago Gala <[EMAIL PROTECTED]>
wrote:

> Replying to myself :(
>
> As this is surely going to byte back ourselves, it probably would make
> sense a test case to see if caching is effectively skipped under the
> right circumstances, but I don't have a clear idea on how to write it.
> Any clue?
>
> Regards
> Santiago
>
> El mié, 09-04-2008 a las 19:43 +0000, [EMAIL PROTECTED] escribió:
> > Author: sgala
> > Date: Wed Apr  9 12:43:56 2008
> > New Revision: 646503
> >
> > URL: http://svn.apache.org/viewvc?rev=646503&view=rev
> > Log:
> > Skip cache in CachedContentFetcher if the nocache option is set
> > > Do we need a call like this at the start of that method:
> > >    if (request.getOptions().ignoreCache) return
> > > nextFetcher.fetch(request);
> >
> > Author: Dave Johnson <[EMAIL PROTECTED]>
> > Signed-off-by: Santiago Gala <[EMAIL PROTECTED]>
> >
> > Modified:
> >
> incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/CachedContentFetcher.java
> >
> > Modified:
> incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/CachedContentFetcher.java
> > URL:
> http://svn.apache.org/viewvc/incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/CachedContentFetcher.java?rev=646503&r1=646502&r2=646503&view=diff
> >
> ==============================================================================
> > ---
> incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/CachedContentFetcher.java
> (original)
> > +++
> incubator/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/CachedContentFetcher.java
> Wed Apr  9 12:43:56 2008
> > @@ -39,6 +39,9 @@
> >    @Override
> >    public RemoteContent fetch(RemoteContentRequest request)
> >        throws GadgetException {
> > +    if (request.getOptions().ignoreCache) {
> > +      return nextFetcher.fetch(request);
> > +    }
> >      RemoteContent result = cache.get(request.getUri());
> >      if (result == null) {
> >        result = nextFetcher.fetch(request);
> >
> >
> --
> Santiago Gala
> http://memojo.com/~sgala/blog/ <http://memojo.com/%7Esgala/blog/>
>
>


-- 
~Kevin

Reply via email to