Picking up the caching value from a Web.config -- please help

  • Thread starter Thread starter almurph
  • Start date Start date
A

almurph

Hi everyone,

Hope you can help me with this. I have the following inside the
App.config of a DLL:

<cache disableMemoryCollection="false"
disableExpiration="false"
privateBytesLimit="1000"
percentagePhysicalMemoryUsedLimit="2000"
privateBytesPollTime="00:00:00" />


This DLL is consumed by a windows application but when I make a call
to the following (from inside the dll and pass to the application)
like:

HttpRuntime.Cache.EffectivePrivateBytesLimit;


I get like a massive number like: 754974720. In short it does not see
to pick up the value that I set inside the App.config. Bummer!


Can anyone please help me "pick it up" - do you know what I mean?
Would appreciate any comments/suggestions/code-saples/user experiences
that you may be able to offer.

Thanks,
Al.
 
Hi everyone,

Hope you can help me with this. I have the following inside the
App.config of a DLL:

<cache disableMemoryCollection="false"
disableExpiration="false"
privateBytesLimit="1000"
percentagePhysicalMemoryUsedLimit="2000"
privateBytesPollTime="00:00:00" />

This DLL is consumed by a windows application but when I make a call
to the following (from inside the dll and pass to the application)
like:

HttpRuntime.Cache.EffectivePrivateBytesLimit;

I get like a massive number like: 754974720. In short it does not see
to pick up the value that I set inside the App.config. Bummer!

Can anyone please help me "pick it up" - do you know what I mean?
Would appreciate any comments/suggestions/code-saples/user experiences
that you may be able to offer.

Thanks,
Al.

It might be possible using
System.Configuration.ConfigurationManager.GetSection()..

I said might
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top