[Developers] different query response between queryeditor and mqlread service

Jonathan W. Lowe jlowe at giswebsite.com
Tue Jan 15 19:15:22 UTC 2008


Augusto,

It sounds like you are encountering the same or a similar problem to the
one described below.

Jonathan

-------- Forwarded Message --------
From: Kirrily Robert <skud at infotrope.net>
Reply-To: For discussions about MQL, Freebase API and apps built on
Freebase <developers at freebase.com>
To: For discussions about MQL, Freebase API and apps built on Freebase
<developers at freebase.com>
Subject: Re: [Developers] sandbox caching old values, slow expiration?
Date: Sun, 30 Dec 2007 01:43:06 +1100

On Dec 30, 2007 12:51 AM, Coral Link <corallink at gmail.com> wrote:
> Hi, quite a few times while working on my app I've run into instances when
> I've made updates/changes to objects in the sandbox BUT when I query the
> just changed object, I get its old values.  I  run my queries in
> queryeditor, and the values returned are the updated ones. After some
> magical period, the mqlwrite/mqlread service starts showing the expected
> values.
>
> Is there some sort of caching going on?  What are the timeouts if any, to
> pull the most current values from the repository?  Is there some sort of
> tickle mechanism to ask mqlread to pull a fresh copy instead of a cached on?

Sounds like the same thing I discovered a few weeks back.  The (short)
thread about it can be found at
http://lists.freebase.com/pipermail/developers/2007-November/000932.html,
but in short, "that's not a bug, it's a feature!"

Here's some quoted text from the reply I got:

> Its part of our caching strategy - the idea is that if a client hasn't
> done a write, then it doesn't need to see the most updated result of a
> query. so I'm guessing you're writing to www.freebase.com via a browser,
> but you have another script that is doing the read?
>
> There is actually a 2nd cookie called "mwLastWriteTime" that stores a
> token that tells us how current your data is. If present, it tells us
> how current your results should be.. if NOT present, it means "I don't
> care how current my data is" and may give you even older data.
>
> If you really, really, need to refresh this cookie to get new data, you
> should do an empty HTTP POST to /api/service/mqlwrite. I encourage you
> to do this sparingly - this is not a generally supported mechanism yet,
> but it should continue to work for the near future.

I wasn't using sandbox when I encountered the problem, but it does
sound like a similar sort of thing.

K.




More information about the Developers mailing list