Trying to upgrade to EntLib from 3.1 to 5.0 and I'm running into an odd problem with caching. All our caching related unit tests are throwing:
failed: System.ArgumentException : Type does not provide a constructor taking a single parameter type of NameValueCollection
We're using the default CacheManger that comes with EntLib, works fine with v3, but when I look at the Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager
class I can't see any related constructor in either 3.1 or 5.0 version?
[ConfigurationNameMapper(typeof(CacheManagerDataRetriever)), CustomFactory(typeof(CacheManagerCustomFactory))]
public class CacheManager : IDisposable
{
// Methods
internal CacheManager(Cache realCache, BackgroundScheduler scheduler, ExpirationPollTimer pollTimer)
{
this.realCache = realCache;
this.scheduler = scheduler;
this.pollTimer = pollTimer;
}
Here's our configuration, which I created from the EntLib config tool:
<cachingConfiguration defaultCacheManager="Whatever">
<cacheManagers>
<add name="Whatever" type="Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager, Microsoft.Practices.EnterpriseLibrary.Caching, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000"
numberToRemoveWhenScavenging="10" backingStoreName="Null Storage" />
</cacheManagers>
I've had a look at the migration guide, but that didn't show anything up.
Are we now expected to create our own wrapper for the CacheManager?