SSMCache ssmCache = new SSMCache(new PrefixedCacheImpl(cache,
getName(), NAME_PREFIX_SEPERATOR), timeToLive.intValue(),
true, false, true);
getCacheManager().getCaches().add(ssmCache);
However, by this way sSMCacheManager.getCacheNames() or sSMCacheManager.getCache(name) does not return the newly added cache?
2. Is there a way to dynamically modify the expiration of SSMCache?
Thanks,
Sweta
--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
To post to this group, send email to simple-spring-memecached@googlegroups.com.
Visit this group at https://groups.google.com/group/simple-spring-memecached.
For more options, visit https://groups.google.com/d/optout.
new SSMCache(cache, timeoutSeconds);
Thanks,
Sweta
Hi,To make it work you have to invoke protected method: CacheManager.addCache. CacheManager has two additional fields that keep it state: cacheName and cacheMap. Those fields have to be sync with result of CacheManager.getCaches().It depends what dynamic means for you. The ExtendedSSMCacheManager allows to set expiration time on each method separately as a part definition in annotation.Best regards,Ragnor
On 8 June 2018 at 13:23, Sweta Nahata <naha...@gmail.com> wrote:
Hi,1. Is there a way to dynamically add new caches in SSMCacheManager or it has to be set only when defining the SSMCacheManager bean in the caches property?I am trying to add as a new cache dynamically in code as belowSSMCache ssmCache = new SSMCache(new PrefixedCacheImpl(cache,
getName(), NAME_PREFIX_SEPERATOR), timeToLive.intValue(),
true, false, true);
getCacheManager().getCaches().add(ssmCache);However, by this way sSMCacheManager.getCacheNames() or sSMCacheManager.getCache(name) does not return the newly added cache?2. Is there a way to dynamically modify the expiration of SSMCache?Thanks,Sweta
--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
To post to this group, send email to simple-sprin...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsubscr...@googlegroups.com.
To post to this group, send email to simple-sprin...@googlegroups.com.
Visit this group at https://groups.google.com/group/simple-spring-memecached.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
To post to this group, send email to simple-spring-memecached@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.
To post to this group, send email to simple-sprin...@googlegroups.com.
Visit this group at https://groups.google.com/group/simple-spring-memecached.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "simple-spring-memecached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-spring-memecached+unsub...@googlegroups.com.