<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's the key + some metadata. So<br>
as long as you don'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'm using string keys. Something like this:<br><br>String key = "mykey";<br>IndexableObject a = new IndexableObject("oldobject");<br>cache.put(key, a);<br>
<br>IndexableObject b = new IndexableObject("test2");<br>
cache.put(key, b);<br><br><br>And when I search for "oldobject", the query returns the object stored on key "mykey" (because IndexableObject("oldobject") still is on the index).<br><br><br>
<br>Israel Lacerra<br><br><br><br><br>
<br>