-
1. Re: Can I Configure getCache(String cacheName) to *NOT* return a Default Cache?
vblagojevic Oct 1, 2010 1:25 PM (in response to cbo_)No, but I can see how your request can make sense in certain scenarios. Maybe we should extend CacheManager API to accommodate this. A JIRA feature request?
-
2. Re: Can I Configure getCache(String cacheName) to *NOT* return a Default Cache?
mircea.markus Oct 1, 2010 1:48 PM (in response to cbo_)Looking at the code: right now when you call getCache(cacheName) is called, if cacheName is not defined in the .xml, a cache with the default configuration is returned. N.B. this is not the default cache, but a cache that has the same configuration as default. Can you please detail what exactly you would want to be returned by CM in this situation? IMO an exception should be thrown in this situation to make users aware that the cache name they are using is not correct.
-
3. Re: Can I Configure getCache(String cacheName) to *NOT* return a Default Cache?
cbo_ Oct 4, 2010 3:47 PM (in response to mircea.markus)Hi guys,
I would like it if the call to CM getCache threw an exception if the cache name was not found in the namedCache section of the config rather than just create a cache in this situation. Right now it masks an issue when something is not specified correctly (i.e. it is silent).
I was thinking if you want this logic could be triggered to provide the exception based on some new item in the global section of the config xml.
Thoughts?
-
4. Re: Can I Configure getCache(String cacheName) to *NOT* return a Default Cache?
mircea.markus Oct 11, 2010 3:13 PM (in response to cbo_)IMO this logic should be the default logic: if no cache with that name then trow an exception. Mind creating a JIRA for this?
-
5. Re: Can I Configure getCache(String cacheName) to *NOT* return a Default Cache?
galder.zamarreno Oct 18, 2010 1:04 PM (in response to mircea.markus)I'm not sure I understand the issues with the way it currently works. If anything, we should clarify the API to avoid confusion.
This is quite a change for our public API, let's discuss this in the dev list.