State Management :: App Settings In Application Cache?

Dec 12, 2010

Is it suitable to store some app settings in Application Cache? I mean settings that might need to be changed frequently...

View 1 Replies


Similar Messages:

State Management :: Cache Settings On Shared Application Pool?

Sep 17, 2010

I have several web applications on a server using the same application pool. The worker process usually takes a lot of ram but usually only from one application. I can successfully limit the cache usage by setting "PrivateBytesLimit" in web.config file when the application uses it own dedicated application pool.

Does anyone know how this setting will be applied when using shared application pool? Is it per application, per worker process or per application pool? Also if it is not per application which setting from which application will be applied?

View 1 Replies

State Management :: Storing Dataset In Application Cache?

Nov 29, 2010

I am writing a web page that returns a small volume of data from a database table. The database is polled every 1 second and the data will be the same for every user. As every user is accessing the same data, there is no need for each user to poll the database and use up db resource.

Therefore, I think I should be using application caching to store the data in a dataset. However, I am slightly stumped as to how to do this.... because how can i ensure that the dataset is kept up to date.

The only way I can think to do this is to have a master user/session (i.e. the first session in the application) that keeps the cache object updated every second, then other users can use that cache object. If the first session ends, then the next requestor of the cache will pick up responsibility for keeping the dataset up to date.

View 4 Replies

State Management :: Session And Application Cache Items Disappear?

Mar 31, 2010

i've been coding an asp.net site using VS2005 for about one month.

my site uses both application cache and session cache to save data.

the syntax i use for application cache is :

HttpApplicationState appState = Application;
appState["someKey"] = "somevalue";

and for session cache i use :

HttpContext.Current.Session["someKey"] = "Somevalue";

my site is deployed on three standalone servers - each server runs a diffrent instance of the site.

two of the servers work just fine, the third has a stange problem - and also has the least free memory space.

in this server items start dissapearing from both the session and application cache - note that i set no expiration date to the cache items.

does anyone know why this could happen?

seems to me there is perhaps some memory limit for cached items setting that i am missing.

View 2 Replies

State Management :: Programmatically Remove IIS HTTP Header Settings?

Sep 11, 2010

Our IIS server (v7) has the following settings in [Custom HTTP Headers] for our whole site:

Pragma: no-cache Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, post-check=0, pre-check=0 X-Powered-By: ASP.NET

Out of the whole site, there are some pages that require the "no cache" setting to be removed for them to work properly. This was done manually by our IIS Administrator until recently. Now we were told that we need to do it programmatically on our end. The following were the code snippets (VB.NET) we have used with no luck in success.

Method-1
Response.Headers.Remove("Pragma")
Response.Headers.Remove("Cache-Control")
Response.Headers.Add("Cache-Control", "private")
Response.CacheControl = System.Web.HttpCacheability.public
Method-2
Response.ClearHeaders()
Response.Headers.Clear()
Response.CacheControl = "Public"
Response.Cache.SetCacheability(HttpCacheability.Public)
Response.Cache.SetAllowResponseInBrowserHistory(True)

View 3 Replies

State Management :: How To Add A List To The Cache

Nov 19, 2010

I want to add a list to the cache and I would like it to stay there as long as posible.

Is there a way adding something to the cache permanently?

how do i set the exiry date of a cached object?

View 6 Replies

State Management :: Cache A Whole Site?

Mar 12, 2011

Is it possible to cache a hole site?ll its pages, images, js, db data etc...If so is it go/bad idea?

View 2 Replies

State Management :: Cache Always Removes Itself?

Aug 11, 2010

I have some weird problem. We're using Windows Server 2008 R2 x64 (8 Cores and
8 GB RAM) with IIS 7.5 and ASP.NET MVC 2.

I always cache (simple) stuff via the context cache and it seems like 9 out of 10 immediate page refreshs the Cache["MyKey"] is always null, even though there's no memory limit set on the pool and the server has lots of free memory.

I add expiring data via:

[Code]....

When just doing: Cache.Insert("MyKey", myObject); or Cache["MyKey"] = myObject; I get the same result (cache is almost always null for that key).

As you can see I added a callback, which writes the CacheItemRemovedReason to a text file, and the text file says CacheItemRemovedReason.Removed for MyKey. The doc for CacheItemRemovedReason.Removed says, that I call Remove/Insert on it, even though in my whole project there's no "Remove"-calls, just simple if(Cache["MyKey"] == null) {Cache["MyKey"] = ...} stuff.

I tried adding:

<caching><cache disableMemoryCollection = "true" disableExpiration = "true" privateBytesLimit="0" percentagePhysicalMemoryUsedLimit="90" privateBytesPollTime="00:02:00" /></caching>

to my web.config file in the System.Web-section but nothing changed :(

why Cache["MyKey"] is almost always null?

View 3 Replies

State Management :: Cache Is Empty After First Use?

Jul 6, 2010

I have a treeview that shown groups and their sub groups in my usercontrol. I pass the parent GroupId to the usercpntrol from the page. I want to cache nodes of treeview for every Parent Group Id. My code is works good for first time and fill the cache object . after refresh the page, cache object fill the TreeNodeCollection succesfully and everything is ok. But after another refresh, cache object is not null but is empty and TreeNodeCollection.count is zero(0). What's my fault? Please help me to solve this problem.

[Code]....

View 5 Replies

State Management :: User Profile Cache?

Apr 5, 2010

I am looking for an elegant (i guess as elegant as it can be) solution to caching a users profile on login (whether it is session, cache, cookie, etc) and keeping it in sync when a users profile is changed. How do you guys handle this? Just simply call a Flush() method in your Save() method that invalidates the cache?

View 1 Replies

State Management :: Cache Sharing Between Applications

Jul 30, 2010

Is it possible to share a cache between multiple ASP.NET applications? The apps may reside on different servers. How can one achieve this requirement?

View 1 Replies

State Management :: Output Cache And Not IsPostBack

May 18, 2010

I'm trying to cache a complex page with lots of controls on it so that if the user navigates to it later it will look like it did when he last saw it.The page has controls which post back and other controls are populated depending on the selections.

I'm using [Code]....
after the <@ Page directive.

What happens is that a postback gets the cached page, so no processing and it looks the same regardless of user selections. So far so good. But if I browse to another page and return by a link, the cached version is ignored and the default page is created again. This is more or less the opposite to what i want.

I attempted to use the validation callback to ensure that a postback resulted in a new version, and that worked, but it still ignored the cached page if it wasn't a postback.I realise that it will need more work to ensure each user gets their version of the page from the cache, but why bother if this doesn't work.

View 3 Replies

State Management :: Cache Vs Static Variable?

Sep 24, 2010

I know the big difference, but one thing is confusing me. Cache works only on a single machine on webfarm and to make it globally we use Velocity or memcache.So is static does same, or is it already work globally ?
eg

Cache["someid"] = "value"; //this will only work on single machine cache,

static string abc = "value"; // will this work on single machine or globally ?

View 6 Replies

State Management :: Add Data To Cache To Add Only 100 Records?

Apr 2, 2010

I have a senario where i want to add the data into cache but only 100 records should be added.

Is their any predefined functions available.

Basically i dont want to write if else condition whiile adding the records wether its 100 records present or not.

View 1 Replies

State Management :: Use the Cache to see The Grid Update?

May 9, 2010

I have a page that has a grid view.

The user selects a person from a dropdown list and then clicks a button that adds the users info as

a new row in the grid.

Adding the new row involves doing an insert and rebinding the grid which is a slow process.

How do I use the cache to see the grid update right away?

View 5 Replies

State Management :: Populate Dropdown From Cache

Oct 6, 2010

I wanted to know the best practice for caching data. Say I have some control example a dropdown list which is populated from my db. Now this dropdown is global and used across many pages. I was thinking of not going to database everytime to fetch data for this dropdown and put the result in Cache. And then populate this dropdown from cache. Is this a good practice or if there is another approach. Can I store my datareader in cache and then use it globally. Also could I do this in application start event?

View 4 Replies

State Management :: Relies The Cache On Site?

Dec 21, 2010

asp.net.2 I am trying to update the website but the cache kips on working. How can I relies the cache on site.

View 7 Replies

State Management :: Remove Cache When OutOfMemory?

Dec 9, 2010

I am Caching dataset in my application, the issue is when there is a large set of data the OutOfMemory exception is thrown.

I want to check for the this exception and when it happens I want to remove the cache object.

View 4 Replies

State Management :: Use An Object From The Cache In A Mvc View?

Sep 24, 2010

I am working with asp.net mvc and i am trying to get acces to a object that is in the cache.In the Application_Start() of Global.asax.cs i create and store an object in the cache like this:

Translator translator = new Translator();
HttpContext.Current.Cache.Insert("Translator", translator, null, System.Web.Caching.Cache.NoAbsoluteExpiration, System.Web.Caching.Cache.NoSlidingExpiration);

Translator holds a dictionary with translations.Now i want acces to this object from the cache to use functions and get values from the dictionary.I know i can acces it like this HttpContext.Current.Cache.Get("Translator") or Cache.Get("Translator") in the views But how can i use the functions of the object ? The meaning of the cache is to have a object that is accesable througout the webapp right ?

Do i have to make an object and asses the value of the Cache.Get("Translator") to it, so i can use the functions or is there another solution?

View 3 Replies

State Management :: Cache Expiry Date Not Working?

Nov 26, 2010

I have added a list to the cache with an expiry date, however the expiry date doesnt work, im not sure how long the cached item lasts but its no more than a day.

[Code]....

View 5 Replies

State Management :: Sharing Cache Between Two Web Applications In The Same Solution

Jul 7, 2010

I have an asp.net solution in which there are two web application projects (client website and admin website) and also a class liabrary project in the same solution . In the live production server, the admin web app is within the client app (eg: client site= [URL] and admin site=[URL]). A class (with static variables) in class liabrary is userd to cache data. My problem is that i cannot get the changes to the static cache by one web project reflected to the other (becoz, i think, they seem to load in seperate appdomains).

View 3 Replies

State Management :: Where Is The System.Web.Caching.Cache Actually Stored

Nov 25, 2010

I am using this to store my user information for authentication. I'd like to know where this is actually being stored? I know that people suggest to store the Session state in SQL. Is this necessary for the Cache as well?

View 4 Replies

State Management :: Cache Condition Always Return Flase?

Aug 27, 2010

i got a function that first insert cache object in dataset and then check if its empty then query the database otherwise just get record from the dataset of cache object. Now the problem is, the condition If DSEktronID Is Nothing Then ' always return false even when i run the application first time?

[Code]....

View 4 Replies

State Management :: Cache An Function Individually For Each Person?

Jun 10, 2010

Can I cache an function individually for each person? Is it possible?

View 4 Replies

State Management :: No-Cache Meta Override On One Image?

Aug 11, 2010

I am using this tag to hepl with my database calls <meta http-equiv="cache-control" content="no-cache" /> however I would like to override this meta tag for one large image using asp.net.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved