Dealing with long keys

10 views
Skip to first unread message

Claudio Santana

unread,
Jul 6, 2012, 5:54:38 PM7/6/12
to xmemc...@googlegroups.com
I need to store objects in Memcached that could  be identified with keys longer than 250 bytes. I know this causes an exception in the current implementation of xmemcached. Have you guys considered adding the functionality of producing a hash for keys longer than 250 bytes and use that hash as the key? Also, when requesting keys longer than 250 they'd be hashed first so they can be found.

This may invalidate looping through all the keys since the hashed ones wouldn't make sense.

Claudio

dennis zhuang

unread,
Jul 12, 2012, 9:32:24 PM7/12/12
to xmemc...@googlegroups.com
Hi,i think you can do this by yourself,but i can provide a  callback interface for this:  KeyProvider.
I need to store objects in Memcached that could  be identified with keys longer than 250 bytes. I know this causes an exception in the current implementation of xmemcached. Have you guys considered adding the functionality of producing a hash for keys longer than 250 bytes and use that hash as the key? Also, when requesting keys longer than 250 they'd be hashed first so they can be found.

This may invalidate looping through all the keys since the hashed ones wouldn't make sense.


Claudio

--
You received this message because you are subscribed to the Google Groups "xmemcached" group.
To view this discussion on the web visit https://groups.google.com/d/msg/xmemcached/-/-nK0ni8a14UJ.
To post to this group, send email to xmemc...@googlegroups.com.
To unsubscribe from this group, send email to xmemcached+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xmemcached?hl=en.



--
庄晓丹
Email:        killm...@gmail.com xzh...@avos.com
Site:           http://fnil.net
Twitter:      @killme2008



Reply all
Reply to author
Forward
0 new messages