C# - 'Caching' A Large Table?

May 19, 2010

I understand that each page refresh, especially in 'AjaxLand', causes my back-end/code-behind class to be called from scratch... This is a problem because my class (which is a member object in System.Web.UI.Page) contains A LOT of data that it sources from a database. So now every page refresh in AjaxLand is causing me to making large backend DB calls, rather than just to reuse a class object from memory. Any fix for this? Is this where session variables come into play? Are session variables the only option I have to retain an object in memory that is linked to a single-user and a single-session instance?

View 4 Replies


Similar Messages:

Fluent NHibernate Data Caching From A Table

Feb 16, 2011

We are developing a multi-language web application with ASP.NET MVC 2 and Fluent NHibernate.Our platform will be multi-language. But just static text will be multi-language. Groups pages depends on community content whatever they use. Like Facebook.We decide to keep all language string in database. And load language when application starts.

View 1 Replies

Large Table In IFrame Crashes IE8?

Jun 2, 2010

I have a page with an iFrame whose source is an ashx page. The handler takes in 3 arguments through the query string and generates a text/html response containing a table. When the table gets >1700 rows it crashes the IE8 browser. The browser freezes and returns a null reference error.If I take the html that is being rendered and place it inside a DIV on the page it renders fine in IE8.

View 3 Replies

SQL Server :: Insert Large No Of Excel Sheet Rows Into Database Table?

Aug 17, 2010

I have an excel sheet that contains around 30,000 rows and 18 colmns. These no of rows and columns may increase in future. I need to read all these records from excel sheet and insert into a table in sql database. For reading the excel book I am using Oledbconnections. The possible solutions I have known as per my knowledge, to insert the data are

1. To insert one record at a time which makes 30,000 database hits. How will this affect the performance?
2. To use liked servers - bu this is not working for me.I do not have database permissions to use linked servers. So, the only option i have is the first one.

View 2 Replies

State Management :: Partial Page Caching (user Control Caching) And Button Events?

Jun 14, 2010

I have a page with a number of user controls, In one of my user controls I have a button event. I turn on output cache for the user control that has the button and vary by control using the ID property of a hidden field control in the user control. whenever I turn on the output cache my button event doesn't fire.

View 2 Replies

WCF / ASMX :: Implement Caching Using System.Web.Caching?

May 15, 2010

how to implement caching in wcf service using System.Web.Caching

View 2 Replies

Web Forms :: How To Import Exsisting SQL Server Table To Access Table(new Table)

Dec 10, 2010

my main intention is that, the exsisting table of sql server database(.dbo) with 1000's of records, that should be import to a new access database table(.mdb).for example if we want to had a new table in db2, of exsisting table in db1 with some conditions by using "select * into New_Tabel from (select * from Exsisting_Table where <Condition>) as objectName". Here the new table is created and records inserted in one execution in db2. The same work should be done for access(sqlserver db --> Access db).Here the new access database table with given name (as string_sysdate) must be created dynamically by clicking a button (multiples time creating new table).Is there any query or c# code for sql server database to access database.

View 2 Replies

Web Forms :: Use Html To Create Table(<table></table>) In Code Behind C#?

Jan 13, 2010

how can i use html to create table(<table></table>) in code behind c#?

View 18 Replies

Can Implement Caching In MVC, If So How

Apr 4, 2011

Can I Implement Caching in MVC, If so how? I wanted to implement Cache in Controllers

View 2 Replies

Caching Css And .js Files?

Dec 5, 2010

I want to use caching technique for .js,.css and images( to avoid round trips and to improve performance of page load) .So, on IIS 7 using Http Response Header, i set Content Expriation to 7 days.Now, on browser its caching which is avoiding round trips for static content ...which is good sign.Now, i modified one of the .js file and i deployed that .js file on server and due to caching my new code is not reflecting on client machines .So i tried lot of ways and here is what i tried after deployment of new .js file After deployment of new .js file

1) I manually delete all the browser cache(cookies,urls,forms,page content etc) on internet explorer

2) used ctrl + f5 to get refresh

3) again on IIS i went back Http Response Header section and set Content Expriation to never

4) stopped the website and restarted

5) on web.config file tried this only

<staticContent>
<clientCache cacheControlMode="DisableCache" />
</staticContent>

6) Also tried to set this on .aspx page

<HTML>
<HEAD>
<TITLE>---</TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
</HEAD>
<BODY>

7) tried to set this on .aspx.cs file

<% Response.CacheControl = "no-cache" %>>
<% Response.AddHeader "Pragma", "no-cache" %>
<% Response.Expires = -1 %>

My target browser is IE.None of them worked,Finally i renamed my .js file to different file name and changed code to make use of that new .js file ..but no luck on this too .Because what i set intially for 7 days still my client machine remembers that.

How do i tell IIS server to refresh cached content code , when some thing got changde on .js or .cssfiles?

View 1 Replies

Caching With Javascript And Asp

Mar 15, 2010

I asked a question a while back on here regarding caching data for a calendar/scheduling web app, and got some good responses. However, I have now decided to change my approach and stat caching the data in javascript. I am directly caching the HTML for each day's column in the calendar grid inside the $('body').data() object, which gives very fast page load times (almost unnoticable). However, problems start to arise when the user requests data that is not yet in the cache. This data is created by the server using an ajax call, so it's asynchronous, and takes about 0.2s per week's data.

My current approach is simply to block for 0.5s when the user requests information from the server, and cache 4 weeks either side in the inital page load (and 1 extra week per page change request), however I doubt this is the optimal method. how to improve the situation? To summarise:

Each week takes 0.2s to retrieve from the server asynchronously. Performance must be as close to real-time as possible. (however the data is not needed to be fully real-time: most appointments are added by the user and so we can re-cache after this) Currently 4 weeks are cached on either side of the inial week loaded: this is not enough. to cache 1 year takes ~ 21s, this is too slow for an initial load.

View 1 Replies

MVC :: Is The Page Caching?

Aug 20, 2010

I am just trying to understand the basics flow to the MVC framework by putting in some breakpoints in the beginning of the actions of a couple of controllers.

One break point is at the HomeController/Index action where it just returns View() of the "Welcome to MVC". The Second break point is at a SecondController/Index action where it uses the Entity Framework and returns a View() of a list from the db.

When I run this in debug, it breaks at the points I expected when I go from Home page to the Second page controller and back to Home. However, when I go to the Second page again, it doesn't break at all? Is the results of the Second page being cached and how and where? How do you trigger for it to get check if data is old?

I check to see if the persistence is done on the db, by changing the value of a field on the db side and it still did not cause it to break on that action and displays old information in the view. I am concerned because it is displaying incorrect values on the UI. I do not have the OutputCache attribute above this action or specified any cache on my web.config.

View 2 Replies

.net - Out Of Process Caching?

Mar 19, 2011

I have a .NET website which queries the DB using Entity Framework every 3 seconds for the status of the transaction using AJAX and updates the page. This status is set by an external client using a RESTful webservice hosted on another server. I want to avoid hitting the DB every 3 seconds for each transaction so want this information cached in memory. The REST webservice updates the cache and website reads from it. Is there any FOSS or commercial Out of Process Shared Cache library that I can use to speed up the performance?

View 3 Replies

C# - Caching, What Would Be A Best Practice

Aug 13, 2010

I have a table that stores songs and plays counter.
Here's the code:

//Increse plays counter
string ip = Request.UserHostAddress;
if (!string.IsNullOrEmpty(ip))
{
if (Cache["plays:" + trackID + ":" + ip] == null)
{
tracks.IncreasePlaysCounter(trackID);
Cache["plays:" + trackID + ":" + ip] = true;
}
}

I wonder what would be a better practice, store many cache items(like this) or store one item like a ArrayList that would contain the users who already heard that song. Is there any difference?

View 2 Replies

How To Data Caching In Clientside

Mar 18, 2010

Is it possible to do data caching in client-side in asp.net and c#.net iam planning to cache a dataset.
if so provide a sample?

View 2 Replies

How To Use Data Caching With Sql Dependency

Dec 2, 2010

We store the location information in a table. Numbers of records are over four thousand. This table structure is self-recursive. In our web project, we use dropdownlist control to populate all these locations. We got performance slow problem. So googling about Caching, we consider to use Data Caching with Sql Dependency. However, not found yet a full-covered sample in .NET 2.0 and SQL Server 2005 or 2008.

View 1 Replies

C# Data Caching And How To Invalidate

Mar 17, 2011

My web application is using the asp.net cache object to store data from the database. I am looking for an elegant to invalidate cache objects but haven't come up with anything elegant yet. It is easy to invalidate a single record or a list of all records in a single table, by keeping track of their cache keys. However I may have any number of lists of subsets of a table's data. I would like to invalidate only the cache records of the lists that contain a particular record, when that record changes. I don't want to have to invalidate all the lists of data for that table if only one of the lists contain that record.

View 1 Replies

C# - Image Caching In Application Without IIS?

Dec 6, 2010

I have an application written in asp.net c# and hosted on IIS6. There are an 'Image' folder with 3-subfolders. These folders contained images of type 'jpg','gif','png' etc. Images are very huge in size and in numbers. On the application every page has some images needs to open/show, due to the size of images my application get slower and slower.

I know there are some techniques to Cache image folders at client machine or some other methods. I have no access on IIS. So, I need some httphandler or httpmodules which provide something like Image-caching.

I tried this : codeproject.com/KB/aspnet/CachingImagesInASPNET.aspx The problem is I have to add an extra extension '.ashx' to every image link. There is no problem with images are loading dynamically but it has trouble with images need to embose a manual link. Also, this is working fine upto around 1000s images.

View 2 Replies

What Are The Advantages And Disadvantages Of Using Caching

Jun 30, 2010

What are the advantages and disadvantages of using caching in an asp.net application?

View 2 Replies

C# - How To Implement SQLDependency Caching

Sep 29, 2010

explain me how to implement SQL Dependency Caching in Asp.Net?

View 3 Replies

Caching In Development Server?

Jan 15, 2010

Details:

I am using visual studio 2005 on windows xp sp3. The website is stored on file system. I used subversion to checkout the code from the server.

Here is the issue:

When I run the application for the first time everything is fine. But when I makes changes in the application then I should just be able to see those changes by reloading the page in browser. But it's not happening. I have to stop the development server and re-run the application which will start a new instance of development server and now I can see the changes. This takes like 3-4 minutes and it's a lot of waste of time which I can't afford.

For my fellow developer who is here for a long time everything is just working fine. He can just modify the page and reload the page in browser to see the changes.

Reading some forums on web, I tried to clear the cache of my browser (IE, Firefox) and it's not working. So, it's not a browser's cache issue. It's related to cache in development server.

View 3 Replies

C# - Caching Attribute For Method?

Mar 16, 2011

Maybe this is dreaming, but is it possible to create an attribute that caches the output of a function (say, in HttpRuntime.Cache) and returns the value from the cache instead of actually executing the function when the parameters to the function are the same?

When I say function, I'm talking about any function, whether it fetches data from a DB, whether it adds two integers, or whether it spits out the content of a file. Any function.

View 5 Replies

MVC :: Output Caching For Several Client IP's

Apr 7, 2010

I have a page with outputcache right above the action in a controller class. What I want is to disable this outputcache for myself. Can it be done by IP?

Something like that: [OutputCache(Duration = 60, VaryByParam = "None", IgnoreIP = "100.100.100.100")]

View 6 Replies

C# - How To Implement VaryByCustom Caching

Mar 15, 2011

I'm trying to implement functionality to cache certain pages depending on the host. This is because I can have multiple versions of a page which have the same parameters, and where the only difference in terms of a request is the host that is being requested. So, for example these two URLs will request the same page, but they are styled differently:[URL]and [URL]


I'm going through the example outlined here:[URL]but it's not making sense to me.

I've added this to my global.asax:

public override string GetVaryByCustomString(HttpContext context, string arg)
{
if (arg == "host")
{
return "host=" + context.Request.Url.Host;
}
return base.GetVaryByCustomString(context, arg);
}

and the example states "To set the custom string programmatically, call the SetVaryByCustom method and pass it the custom string to use", with code similar to the following:

Response.Cache.SetVaryByCustom("host");

The problem is I'm not sure what to do with this. I've added the previous line to MvcApplication_EndRequest because it seems like it makes sense, but I don't think this is right because when I set breakpoints in GetVaryByCustomString they never get hit.

[Code]....

View 4 Replies

How To Use Caching To Improve Performance

Mar 30, 2011

My scenario is : WebApp -> WCF Service -> EDMX -> Oracle DB

When I want to bind grid I fetch records from Oracle DB using EDMX i.e LINQ Query. But, this degrades performance as multiple layers take place between WebApp & Oracle DB. Can I use caching mechanism to improve the performance? But as far as I know cache is shared across the whole application. So, if I update cache other user might receive wrong information. Can we use caching per user? Or is there any other way to improve performance of the application?

View 2 Replies







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