On Aug 10, 2007, at 1:13, Cam Bazz wrote:

Consider the following scenario where I have an object:

class Node {
   int id;
   Node next;
}

and I am storing these in memcached, such as:

Node n;
put( n.id, n);

when I get(int) a node, can I trace the reference next, without requiring a map lookup?

        memcached is just a hash table.  For example:

        Map<Integer, Node> m=new HashMap<Integer, Node>();

        m.put(n.id, n);

        Can you get n.next in that example without doing another map lookup?

Furthermore, it doesn't attempt to understand the data you're giving it. The value is a blob and memcached can not and should not understand what it actually means.

--
Dustin Sallings


Reply via email to