Is there way to set key Type and Value Type with CacheConfiguration through spring XML bean configuration

49 Views Asked by At

Just exploring around usage of gridgain cache, trying to create a sample cache using spring XML configuration. Looking to set key type and value type for cache as below which is ofcourse not working.

<bean id="cache" class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="TestCache"/>
<property name="keyType" value = "java.lang.String"/>
<property name="valueType" value = "java.lang.String"/>
</bean>

I wanted to set type of key and value with CacheConfiguration bean configuration

1

There are 1 best solutions below

0
Stephen Darlington On

To use a cache as a key-value store, you don't need to specify the key- or value type.

If you want to add SQL support to the cache, you can use Query Entities to define column types.