<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In terms of the indexing, the same key that you use in the cache is<br>


pretty much stored as the key. Strictly it&#39;s the key + some metadata. So<br>
as long as you don&#39;t do something like: -<br>
<br>
int key1 = 5;<br>
cache.put(key1, value1);<br>
<br>
double key1 = 5;<br>
cache.put(key1, value2);<br>
<br>
This way, the interceptor will think that two separate keys are being<br>
used. Even though they are both the same number, when the String<br>
representation is built, they will have metadata about the type and<br>
hence be different String representations.<br>
<br>
I guess my point here is that there are cases where we need to treat<br>
this issue with perhaps a little bit more care. The other gurus here<br>
will probably have a better idea on this.<br>
<div class="im"><br></div></blockquote></div><br>But I&#39;m using string keys. Something like this:<br><br>String key = &quot;mykey&quot;;<br>IndexableObject a = new IndexableObject(&quot;oldobject&quot;);<br>cache.put(key, a);<br>

<br>IndexableObject b = new IndexableObject(&quot;test2&quot;);<br>
cache.put(key, b);<br><br><br>And when I search for &quot;oldobject&quot;, the query returns the object stored on key &quot;mykey&quot; (because  IndexableObject(&quot;oldobject&quot;) still is on the index).<br><br><br>

<br>Israel Lacerra<br><br><br><br><br>
<br>