[infinispan-issues] [JBoss JIRA] (ISPN-10235) Allow SpringRemoteCacheManager create a cache in runtime with the default or a provided template

Diego Lovison (Jira) issues at jboss.org
Thu May 23 15:19:00 EDT 2019


Diego Lovison created ISPN-10235:
------------------------------------

             Summary: Allow SpringRemoteCacheManager create a cache in runtime with the default or a provided template
                 Key: ISPN-10235
                 URL: https://issues.jboss.org/browse/ISPN-10235
             Project: Infinispan
          Issue Type: Enhancement
    Affects Versions: 10.0.0.Beta3
            Reporter: Diego Lovison


When working in a Spring app we can provide a cache name and Spring will create that cache in Runtime. When using Remote Infinispan Spring Cache Support the exception will throw

{noformat}
org.infinispan.client.hotrod.exceptions.HotRodClientException: org.infinispan.server.hotrod.CacheNotFoundException
{noformat}

This is because SpringRemoteCacheManager support only getCache


{code:java}
   public SpringCache getCache(String name) {
      RemoteCache<Object, Object> nativeCache = this.nativeCacheManager.getCache(name);
      return new SpringCache(nativeCache, this.readTimeout, this.writeTimeout);
   }
{code}

We could allow the developer specify a boolean value like: createRemoteCacheInRuntime=true and defaultRemoteCacheTemplate=myTemplate

In this case when adding @Cacheable("books") the books cache will be created based on the specified arguments



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the infinispan-issues mailing list