Spring XML bean to configure two caffeine caches

I am trying to setup caffeine cache using spring xml bean configuration.
I want to have two different caches,

  1. to store “id”
  2. to store “name”

I tried doing following,

<bean id="cacheManager" class="org.springframework.cache.caffeine.CaffeineCacheManager">

    <property name="cacheNames">
        <set>
            <value>id</value>
            <value>name</value>
        </set>
    </property>
    <property name="cacheSpecification" value="${caffeine.spec}"/>
</bean>

Code where I am using it looks like,

@Cacheable(cacheNames = {"id"})
public String getId(final String key){
  System.out.println("no id in cache");
  //code
}

@Cacheable(cacheNames = {"name"})
public String getName(final String key){
  System.out.println("no name in cache");
  //code
}

The getId() method somehow works as per the caffeine.spec values which is maximumSize=500,expireAfterAccess=5s in my project. So if I call the method within 5 sec it does not print the message and if I call it within 5sec it calls the method. But the getName does not work. It prints the message all the time.
Anyone has ever tried to setup caffeine cache to setup multiple caches.