The object has to be serialized in some way to be stored.  Is there
a reason you don't want to serialize it in an XML form?

On Mar 13, 1:35 pm, MLL <[email protected]> wrote:
> hello,
>
> I'm trying to cache an XML object:
>
> Enyim.Caching.MemcachedClient client = new
> Enyim.Caching.MemcachedClient();
>
> XmlDocument _xml = new XmlDocument();
>
> _xml.LoadXml(_dt.Rows[0]["DataXML"].ToString());
>
> client.Store(StoreMode.Set, "XML_KEY", _xml, DateTime.Now.AddMinutes
> (20));
>
> but when I restore the object from the cache, I get null.
>
> XmlDocument _xml = client.Get<XmlElement>("XML_KEY");
>
> I try also:
>
> XmlDocument _xml = (XmlDocument )(client.Get<object>("XML_KEY"));
>
> I did test with strings and datatable and the Memcached process works
> fine. Just with XML object I am not able to get the key.
>
> Please, if you have any suggestion, I will be apreciate. I don't have
> any idea, what to do.
>
> Thanks very much
>
> MLL

Reply via email to