Sorry clicked on sent button too early. Well My point was either there is an issue in the documentation , or this functionality is yet not supported or may be there is no need to register CM ( I am doubt it) .
Unlike Latest-strategies, lock-strategies, triggers , caches element does not allow to insert any element except cache. I will try to do test out my custom cache manager and will let you all know. On Fri, Apr 10, 2009 at 2:34 PM, Garima Bathla <[email protected]>wrote: > Thanks Maarten, > > Looks like there might be an issue either with the documentation : Because > as per the documentation I cannot insert any xml tag under caches tag, if I > could then I will be able to configure the cache manager as you said. But in > Apache Ivy R 2 C1 there can only be a cache element defined under caches, > and not any xml element > > http://ant.apache.org/ivy/history/2.1.0-rc1/settings/caches/cache.html > > Unlike > > On Fri, Apr 10, 2009 at 2:22 PM, Maarten Coene <[email protected]>wrote: > >> >> I'm not sure, but I think you can do it like this: >> >> <classpath file="/path/to/custom/cache/manager.jar"/> >> <typedef name="Custom-CM" >> classname="org.gb.test.OptimisticCacheManager"/> >> >> <caches> >> <cache name="xxx" basedir="/path/to/custom/basedir/> >> <Custom-CM name="yyy" basedir="..." /> >> </caches> >> >> Here the cache with name "yyy" will be your custom cache-manager. >> >> Maarten >> >> >> >> >> ----- Original Message ---- >> From: Garima Bathla <[email protected]> >> To: [email protected] >> Sent: Friday, April 10, 2009 2:26:09 AM >> Subject: Custom Cache Managers >> >> Hello, >> >> I am in a process of creating my own custom cache managers and I am little >> confused reading the documentation. As per documentation, I can define my >> custom cache manager via type def and classpath. Also as per documentation >> the caches element lets you configure the default cache manager or you can >> create multiple new definitions of cache managers based on the default >> cache >> manager in the child element of caches - i.e. cache element. But I am >> confused on how exactly the custom cache manager that I created via >> typedef >> tag can be registered as a Cache Manager before it can be used. >> >> >> e.g. >> <classpath file="/path/to/custom/cache/manager.jar"/> >> <typedef name="Custom-CM" >> classname="org.gb.test.OptimisticCacheManager"/> >> >> <caches> >> <cache name="xxx" basedir="/path/to/custom/basedir/> >> </caches> >> >> So in the above example a new cache manager instance xxx is created and >> this >> is based on default-cache manager. So where exactly can I register >> OptimisticCacheManager? Like other typedef's for lockstrategies and >> latest-strategies. >> >> >> Also please note I don't want to over-ride the default-cache manager . >> >> >> From the documenation description of Cache element : >> cache< >> http://ant.apache.org/ivy/history/2.1.0-rc1/settings/caches/cache.html >> >defines >> a new repository cache instance, >> *based on the default repository cache implementation* >> >> >> >> >> >
