ASP Caching Technology

Source: Internet
Author: User
Using caching technology in ASP can greatly improve your site performance, but these implementations are very simple, and it will show how the caching on the server works and how you use an ADO connection technology called disconnected.
Before introducing these technologies, let's explain exactly what an ASP's caching technology is.
The so-called cache is actually in memory to open up a space to save data, using the cache you do not have to frequent access to the data you have saved on the hard disk, flexible use of the cache you will be spared the distressed look at the poor hard drive read data tortured. Once you have executed a query action and put the query results into the cache, you can quickly and repeatedly access the data. And if you do not put the data into the cache, when you execute the query again, the server will consume the process from the database to get and sort.
When the data is stored in the cache, the time taken to Requery is primarily the time it takes to display the data. That is, we should not put data that is often needed to change into a server-side cache, and we should put the data in the cache with fewer changes, but with frequent access.
Now let's talk about ASP's use of caching technology on the server side, and then discuss how ASP can use the
Caching technology.
When you have a large amount of data (static, that is, less change) needs to be displayed to the client, you can consider using the server-side caching technology. This kind of technology is especially suitable for those websites with strong display style consistency (hehe, not easy to use for non-mainstream websites). )
In fact, the implementation of the method is particularly simple, we just take a look at the following simple example to understand.
This is an example program for displaying the classification of books.
displaybooks.asp file:
<%@ language=javascript% >
< HTML >
< BODY >
< form Method=post >
Book Classification <%= getbookslistbox ()% >
< p>
< input Type=submit >
<%
function Getbookslistbox ()
{
Bookslistbox = Application ("Bookslistbox")
if (Bookslistbox!= null) return bookslistbox;
CRLF = String.fromCharCode (13, 10)
Bookslistbox = "< select name=books>" + CRLF;
SQL = "SELECT * from books ' ORDER by Name";
Cnnbooks = Server.CreateObject ("ADODB"). Connection ");
Cnnbooks.open ("Books", "Admin", "");
Rstbooks = Cnnbooks.execute (SQL);
Fldbookname = Rstbooks ("BookName");
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.