Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Caching Records in Memory with ASP.NET

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 16-02-2010
Member
 
Join Date: Nov 2009
Posts: 652
Caching Records in Memory with ASP.NET
  

Hello, I am learning ASP.NET programming language. And while learning it, I have come to know that it is possible to catch the records from the memory. I am not able to understand the basic concept behind this, so if you are having idea about it, then please help me to achieve it. It will be helpful to me to know about it. If you know the sources from which I can able to get more knowledge about the same then also please provide help about it.

Reply With Quote
  #2  
Old 16-02-2010
Member
 
Join Date: Apr 2008
Posts: 1,947
Re: Caching Records in Memory with ASP.NET

Hello, if you want to cache the data in memory then you need to create the method which will take into account the memory for the given number of time. And between that much period that data is displayed into the memory and so it will provide more faster response to the any type of query. And if the time period is complete then the data from the cache is refreshed and thus it can contain the new or fresh data in the memory.
Reply With Quote
  #3  
Old 16-02-2010
Member
 
Join Date: May 2008
Posts: 2,007
Re: Caching Records in Memory with ASP.NET

Hey, while searching about your question I have got the below mentioned code which will help you to store or get the object virtually from the AppDomain and for that you must need to make use of the code below:

Code:
System.AppDomain.CurrentDomain.SetData("NewData", Type)

Type =(Type) System.AppDomain.CurrentDomain.GetData("NewData")
Reply With Quote
  #4  
Old 16-02-2010
Member
 
Join Date: May 2008
Posts: 2,290
Re: Caching Records in Memory with ASP.NET

Hello, if you want to know the details about the Caching Records in Memory with ASP.NET, then you must need to make use of the code below:

Code:
<%
Function Disp()
    Const Text = &H0001
    Dim sqlq, connection , result

    sqlq = "SELECT id, FName, lLName FROM Names"

    Set connection  = Server.CreateObject("ADODB.Connection")
    connection .Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & _
          Server.MapPath("CacheDemo.mdb")

    Set result = Server.CreateObject("ADODB.Recordset")
    result.Open sqlq, connection , 2, 4, Text

    If Not result.EOF Then
      Dim variable
      variable = "<table width=""90%"" align=""center"""
      variable = variable & " border=""1""  bordercolor=""silver"""
      variable = variable & " cellspacing=""2"" cellpadding=""0"">"
      variable = variable & "<tr bgcolor=""#CCDDEE""><td width=""5%"""
      variable = variable & ">ID</td><td>Firesultt Name</td>"
      variable = variable & "<td>Last Name</td></tr>"

    While Not result.EOF
      variable = variable & "<tr><td bgcolor=""#CCDDEE"">"
      variable = variable & result("ID") & "</td><td>" & result("FName")
      variable = variable & "</td><td>" & result("lLName")
      variable = variable & "</td></tr>"
      result.MoveNext
    Wend

      variable = variable & "</table>"

      Disp = variable
    Else
      Disp = "Data Not Available."
    End If

    result.Close
    connection .Close
    Set result = Nothing
    Set connection  = Nothing
End Function
%>
Reply With Quote
  #5  
Old 16-02-2010
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: Caching Records in Memory with ASP.NET

Hello, if you want to make use of the faster response while making use of the web application then it is necessary to use the Caching records in memory with Asp.net. Most of time this technique is used by the developer for getting faster working of the web site. It is having following two types of caching:
  • Output Caching
  • Data Caching
Reply With Quote
  #6  
Old 16-02-2010
Member
 
Join Date: Apr 2008
Posts: 2,000
Re: Caching Records in Memory with ASP.NET

Hello, if you make use of the code below then you will come to know the details about the caching records in memory with ASP.NET
Code:
 If (args == "site") then
        dim Name as string = _
        Context.Request.Browser.Browser + Context.Request.Browser.MajorVersion.ToString() 
        return Name
   Else if (args=="SomeCustomString") then
    Else MyBase.GetVaryByCustomString(context, args)
    End If
End Function
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Caching Records in Memory with ASP.NET"
Thread Thread Starter Forum Replies Last Post
Does Intel X79 Chipset going to get SSD caching Diedrick Motherboard Processor & RAM 8 05-04-2012 03:33 AM
Intel Z68 system with SSD for caching X-MaaN Motherboard Processor & RAM 6 04-08-2011 11:27 PM
Code for Caching RMG Software Development 3 02-01-2009 09:39 PM
How to increase the File System Caching Memory? SinguIar Windows Vista Performance 1 25-12-2008 01:29 AM
disk caching Windows Server Help 6 10-12-2007 09:07 AM


All times are GMT +5.5. The time now is 05:47 AM.