MemCachedClient.set always returns false

Greg Whalin gwhalin at gmail.com
Sun Feb 24 23:34:52 UTC 2008


Yes, any non-primitive backed object needs to implement Serializable (or
Externalizable) in order to serialize.

gw

On Sun, Feb 24, 2008 at 6:25 PM, William Chu <willchu at gmail.com> wrote:

> Thank you so much for the help.
>
> I did not try any other object other than Strings.
>
> Does each object need to implement the serializable interface in order to
> be stored by memcached?
>
> i.e. mc.set(key, someObject);
>
> ie:
> class SomeObject implements Serializable {
> ...
>
>
> On Sun, Feb 24, 2008 at 3:06 PM, Dustin Sallings <dustin at spy.net> wrote:
>
> >
> > On Feb 24, 2008, at 14:48, William Chu wrote:
> >
> > I think you are correct ... I can set a "String" but not any other
> > object.
> >
> >
> > None?  What other kinds of objects did you try?
> >
> > Why?
> >
> > *boolean isSet  = mc.set(key, "Some String");*
> >
> > isSet = true and thus everything works correctly.
> >
> >
> > I need to be able to cache any object....What is going wrong? Why is my
> > client failing?
> >
> >
> > client implies there's a server.  client <-> server communication
> > requires the two to agree on how to represent data being passed around.
> >  Java does that using its serialization mechanism.
> > If you don't have any kind of external encoding for a particular object,
> > it can't be sent to the server.
> >
> > It may be that you just want your object to implement Serializable, but
> > it's not always that simple.
> >
> > --
> > Dustin Sallings
> >
> >
> >
> >
>


-- 
Greg Whalin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20080224/fc3374bf/attachment.html 


More information about the memcached mailing list