[Developers] mqlread queries and caching
Tim Kientzle
tim at metaweb.com
Mon Sep 8 21:44:11 UTC 2008
/api/service/touch takes no arguments. It sets the freshness constraint
to the time at which you called /api/service/touch.
You cannot create your own mwLastWriteTime cookie. It contains
information about internal state that can only be generated on the
server.
Tim Kientzle
On Sep 8, 2008, at 2:05 PM, Augusto Callejas wrote:
> ah okay. is there a special value i can use that represents the
> present
> time, like "0" or "-1"?
>
> augusto.
>
>
> On 9/8/08 1:53 PM, "Jason Douglas" <jason at metaweb.com> wrote:
>
>> Having no mwLastWriteTime cookie does not avoid caching... pretty
>> much
>> the opposite. The only way you to avoid caching is to present a
>> "current" mwLastWriteTime cookie obtained in the response to an
>> upload
>> or write or by calling the touch service.
>>
>> -jason
>>
>>
>> On Sep 8, 2008, at 1:35 PM, Augusto Callejas wrote:
>>
>>> wouldn't it be less work (one less roundtrip HTTP request) to clear
>>> out the
>>> value of "mwLastWriteTime" instead of calling "/api/service/touch"?
>>> i want
>>> to do a series of queries that avoid caching.
>>>
>>> thanks
>>> augusto
>>>
>>>
>>> On 9/8/08 11:21 AM, "Ben Drees" <ben at metaweb.com> wrote:
>>>
>>>> That's correct - You must track cookies for /api/service/touch to
>>>> have
>>>> an effect.
>>>>
>>>> An individual user agent that tracks cookies will automatically
>>>> read its
>>>> own writes.
>>>>
>>>> An individual user agent that does not track cookies may not always
>>>> automatically read its own writes.
>>>>
>>>> /api/service/touch is useful when one user agent needs to read the
>>>> results of another user agent's recent writes.
>>>>
>>>> The cache-suppressing HTTP request headers work, but may result in
>>>> poorer performance than with the /api/service/touch approach.
>>>>
>>>> David Flanagan wrote:
>>>>> Doesn't /api/service/touch work by simply returning a
>>>>> nwLastWriteTime
>>>>> cookie? So if you don't track the cookie in the first place, then
>>>>> the
>>>>> touch service won't do you any good, if I understand correctly.
>>>>>
>>>>> David
>>>>>
>>>>> John Giannandrea wrote:
>>>>>
>>>>>> Augusto,
>>>>>> If its the same program doing the writes and the reads you should
>>>>>> just
>>>>>> track the mwLastWriteTime cookie rather than calling /api/
>>>>>> service/
>>>>>> touch every time.
>>>>>> -jg
>>>>>> On Sep 5, 2008, at 4:41 PM, Phil Gochenour wrote:
>>>>>>
>>>>>>> Hi Augusto,
>>>>>>>
>>>>>>> have a look at this Help topic and let us know if it solves the
>>>>>>> problem for you:
>>>>>>>
>>>>>>> Avoid caching problems when using the API
>>>>>>> http://www.freebase.com/view/guid/9202a8c04000641f80000000076224e8
>>>>>>>
>>>>>>> Phil
More information about the Developers
mailing list