check have a low network traffic, i think it´s a nice command

2011/3/18 Les Mikesell <lesmikes...@gmail.com>:
> On 3/18/2011 3:12 PM, Oleg Romanenko wrote:
>>
>> Hi.
>>
>>> How could this be put to use?  i.e. when is knowing that
>>> something exists at some point in an ephemeral store useful to an
>>> application?
>>
>> This command provides support for lazy read operation. You can read
>> the value of the key only when is really necessary.
>> For example:
>> 1. I am storing some information about the client in memcached. The
>> key - is the name of the session, which is is given to the client.
>> 2. I have a lot of service scripts that should check the rights of
>> clients. They need only to know whether there is a key (then
>> everything is OK) or not (then the client is redirected to the login
>> script).
>> 3. And I have only two scripts that use the value of a key in they
>> work.
>>
>> Of course, this problem can be solved by creating an additional (flag)
>> key(s) without content. But such approach is less secure and in
>> generally reduces the consistency of system's data (for example, key
>> with data can be deleted when the flag key still remain available).
>
> Seems odd to not care about the content in a cache where you aren't
> guaranteed any relationship from one access to the next.  That is, don't you
> have situations here where a check would say a key exists but when you try
> to retrieve it, it doesn't (expired, evicted, deleted by a concurrent
> operation, etc.)?
>
> --
>  Les Mikesell
>   lesmikes...@gmail.com
>
>



-- 
Roberto Spadim
Spadim Technology / SPAEmpresarial

Reply via email to