This question might be more about proper Java than it is about the Cache<K,V>
interface, but I wouldn't know where else to ask this.
I'm implementing a Cache<K,V> interface for memached and I'm using
spymemcached. The spymemcached client only takes a string as the key.
So I've implemented, for example, the get(K key) method it by casting the
arguments as shown below.
@Override
public V get(K key) throws CacheException {
return (V) mc.get((String) key);
}
So the question is, is this safe/proper use of Java in this context? It
doesn't look right to me.
Thanks,
James