Deletes Are Driving Me Crazy
Matthew Glubb
matt at zgroupplc.com
Wed Jan 11 12:09:41 UTC 2006
Thanks for the reply, but no, that is not want I want. I need to know
that when I delete an item, it is deleted. I need to be able to use
add because there are other situations where I want to prevent the
possibility of overwriting a value. 'add' is a great way to defend
against that situation.
Matt
On 11 Jan 2006, at 11:39, Fabian Thylmann wrote:
> Hi Matt,
>
> what you probably want is
>
> set(key, val)
>
> which will set a new value for key even if it exists.
>
> Fabian
>
>
> Matthew Glubb wrote:
>
>> Happy New Year to you all.
>>
>> I am sorry if this has been covered before but I have trawled
>> through the list archives and cannot find a definitive solution.
>>
>> I would really like to know how to:
>>
>> add(key, val)
>> delete(key)
>> add(key, val)
>>
>> Just seems to plain not work (all adds have zero expiration).
>>
>> If I:
>>
>> add(key, val)
>> delete(key, 1)
>> sleep(2)
>> add(key, val)
>>
>> It works.
>>
>> Please can someone enlighten me as to how I may immediately delete
>> a key and then add a key of the same name? I am using
>> memcached-1.1.12 & John McCaskey's mcache extension 1.2.0 beta10.
>>
>> I noticed in the archives this thread:
>>
>> <http://lists.danga.com/pipermail/memcached/2004-July/000688.html>
>>
>> This seems to be related to the problem that I am having but my
>> version of memcached is almost a year later than this so I would
>> assume that the patch referred to in the thread is included. I'm
>> going to check that this isn't a problem with John's mcache
>> extension but if anyone has a simple answer to my problem I'd
>> love to hear it.
>>
>> Thanks a lot for your help :)
>>
>> Matt
>>
>>
>
m a t t h e w g l u b b
________________________________________________________________________
Z Group PLC
Tel: +44 (0) 8700 111 173
Fax: +44 (0) 8707 051 393
Txt: +44 (0) 7800 140 877
Web: <http://www.zgroupplc.com/>
PLEASE NOTE ZGROUP IS NOT LIABLE FOR ANY DAMAGES, MALFUNCTION, OR LOSS
OF DATA, CAUSED AS A RESULT OF FOLLOWING ANY ADVICE ENCLOSED IN THIS
EMAIL. ANY CHANGES SHOULD BE CARRIED OUT AT YOUR OWN RISK.
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. The opinions expressed in this mail are those of the author
and do not necessarily represent the views of the company. If you have
received this email in error please notify <service at zgroupplc.com>
More information about the memcached
mailing list