You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Dave <sn...@gmail.com> on 2008/04/09 17:22:05 UTC
Turning off Gadget caching for dev/debug
Seems like somebody turned on caching in Shindig, which makes Gadget
development a little more difficult.
So, I'm trying to figure out how to turn if off for debugging and I've
made a couple of changes to ensure that the URL used to call the
Gadget server has the nocache=1 flag. That didn't work and I still get
a cached gadget, so I started tracing through the code an I came upon
this:
CachedContentFetcher.java:
public RemoteContent fetch(RemoteContentRequest request)
throws GadgetException {
RemoteContent result = cache.get(request.getUri());
if (result == null) {
result = nextFetcher.fetch(request);
synchronized (cache) {
cache.put(request.getUri(),result);
}
}
return result;
}
Do we need a call like this at the start of that method:
if (request.getOptions().ignoreCache) return nextFetcher.fetch(request);
- Dave
Re: Turning off Gadget caching for dev/debug
Posted by Santiago Gala <sa...@gmail.com>.
El mié, 09-04-2008 a las 12:29 -0700, Kevin Brown escribió:
> On Wed, Apr 9, 2008 at 8:22 AM, Dave <sn...@gmail.com> wrote:
>
> > Seems like somebody turned on caching in Shindig, which makes Gadget
> > development a little more difficult.
> >
> > So, I'm trying to figure out how to turn if off for debugging and I've
> > made a couple of changes to ensure that the URL used to call the
> > Gadget server has the nocache=1 flag. That didn't work and I still get
> > a cached gadget, so I started tracing through the code an I came upon
> > this:
> >
> > CachedContentFetcher.java:
> >
> > public RemoteContent fetch(RemoteContentRequest request)
> > throws GadgetException {
> > RemoteContent result = cache.get(request.getUri());
> > if (result == null) {
> > result = nextFetcher.fetch(request);
> > synchronized (cache) {
> > cache.put(request.getUri(),result);
> > }
> > }
> > return result;
> > }
> >
> > Do we need a call like this at the start of that method:
> > if (request.getOptions().ignoreCache) return
> > nextFetcher.fetch(request);
>
>
> Yep, this would be my mistake. Feel free to open a JIRA ticket and assign to
> me in case nobody else commits a fix soon.
>
Committed, literally what Dave sent. I used git-svn dcommit, and filled
Author: and Signed-off-by: headers "a la" git to enable precise future
tracing and blaming in case it is needed. :)
Regards
Santiago
>
> >
> > - Dave
> >
>
>
>
--
Santiago Gala
http://memojo.com/~sgala/blog/
Re: Turning off Gadget caching for dev/debug
Posted by Kevin Brown <et...@google.com>.
On Wed, Apr 9, 2008 at 8:22 AM, Dave <sn...@gmail.com> wrote:
> Seems like somebody turned on caching in Shindig, which makes Gadget
> development a little more difficult.
>
> So, I'm trying to figure out how to turn if off for debugging and I've
> made a couple of changes to ensure that the URL used to call the
> Gadget server has the nocache=1 flag. That didn't work and I still get
> a cached gadget, so I started tracing through the code an I came upon
> this:
>
> CachedContentFetcher.java:
>
> public RemoteContent fetch(RemoteContentRequest request)
> throws GadgetException {
> RemoteContent result = cache.get(request.getUri());
> if (result == null) {
> result = nextFetcher.fetch(request);
> synchronized (cache) {
> cache.put(request.getUri(),result);
> }
> }
> return result;
> }
>
> Do we need a call like this at the start of that method:
> if (request.getOptions().ignoreCache) return
> nextFetcher.fetch(request);
Yep, this would be my mistake. Feel free to open a JIRA ticket and assign to
me in case nobody else commits a fix soon.
>
> - Dave
>
--
~Kevin