Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Can I access the same data in memcached with different client libraries?

0
10 Posted

Can I access the same data in memcached with different client libraries?

0

# Different libraries will likely serialize data differently, for example, the Perl Cache::Memcached will use Storable to serialize complex structures (like hash references, objects, etc). This format will most likely not be readable by other language’s client API. If you are storing complex data and need it to be readable by multiple APIs, you may consider storing simple strings in a format that can easily be parsed by external libraries, such as [http://http://www.json.org JSON] or XML.

0

Technically, yes, but the two issues you may run into are as follows: • Different libraries will likely serialize data differently, for example, the Perl Cache::Memcached will use Storable to serialize complex structures (like hash references, objects, etc). This format will most likely not be readable by other language’s client API. If you are storing complex data and need it to be readable by multiple APIs, you may consider storing simple strings in a format that can easily be parsed by external libraries, such as JSON –> or XML. • Similarly, your data may be compressed from one client but not from another. • Different libraries may hash keys differently. If you are connecting to multiple servers, your keys are likely hashed and then stored according to the algorithm implemented by that language’s API. Its possible that different client libraries use a different scheme for making this determination, so keys going to server A from Perl might end up on server B from Python, etc. The P

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.