• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

When I tried to define a cache using name “default”, it tells default cache has already been defined.

This is one undocumented feature, should be either documented or fixed.

Sourceforge Ticket ID: 1694609 - Opened By: nobody - 4 Apr 2007 21:54 UTC

Comments

Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320 Originator: NO

Hi

Agreed. I have added the following test which confirms the reserved cache name “default”.

/** * Tests that you cannot use the name default for a cache. */ public void testLoadConfigurationFromInvalidXMLFileWithDefaultCacheNameUsed() throws Exception { File file = new File(TEST_CONFIG_DIR + “ehcache-withdefaultset.xml”); try { Configuration configuration = ConfigurationFactory.parseConfiguration(file); } catch (CacheException e) { assertTrue(e.getMessage().contains(“The Default Cache has already been configured”)); }

}

I have added JavaDoc to the cache constructors, a note to ehcache.xml and a note in the configuration page in the guide.

The change is in trunk and will be in ehcache-1.3-beta. Thanks.

Greg Comment by: gregluck - 28 Apr 2007 07:12 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira