This is not a supported feature in memcached.  While I have been working
with Microsoft's distributed cache offering (Velocity) and I think memcached
is a lot cleaner in a lot of ways, there are a couple of items that Velocity
does that might fit into memcached. One of those is to be able to get the
metadata about the item as well as just the item, so I can make a call to
the cache and get the expiration time associate with the object so I can
determine if I want to have one client get an updated version of that data.
When I want to do this in memcached, I store my data within another object
that contains a refresh date/time. Then, every call to memcached, I check to
see if it is time to refresh the data. The first client to get the data out
of memcached after that refresh time updates the cache to have a later
refresh time so that subsequent calls by other clients use the cache data
and then gets the data from the source, stores that in cache and then
delivers the data to the requester.
Within Velocity I can just get the object with metadata to determine if it's
time to refresh the data. In addition, I can execute a command
(ResetObjectTimeout) to reset the TTL for the object, extending it's
expiration point.

I think the ability to do those two things would be useful additions to
memcached.

Josef

On Tue, Nov 25, 2008 at 4:16 AM, Masaru Yokoi <[EMAIL PROTECTED]>wrote:

>
> Hello,
>
> I want to update exptime of stored item in memcached to extend
> lifetime of datum when increment value. I read document of protocol
> and source code, I could not find the way to update exptime.
>
> I thought to execute "append" or "prepend" command with exptime
> argument, zero length value. But argument "extime" of append/prepend
> command is not accepted by memcached such as following in
> "protocols.txt".
>
>  The append and prepend commands do not accept flags or exptime.
>  They update existing data portions, and ignore new flag and exptime
>  settings.
>
> If the append/prepend command accept...
>
> I think some way to solve it, I change memcached as following.
>
>  - Extend optional argument "exptime" for "incr".
>  - Add commnad "exptime"
>
> How do I do?




-- 
"If you see a whole thing - it seems that it's always beautiful. Planets,
lives... But up close a world's all dirt and rocks. And day to day, life's a
hard job, you get tired, you lose the pattern."
Ursula K. Le Guin

http://www.finsel.com/words,-words,-words.aspx (My blog) -
http://www.finsel.com/photo-gallery.aspx (My Photogallery)  -
http://www.reluctantdba.com/dbas-and-programmers/blog.aspx (My Professional
Blog)

Reply via email to