MCQs > IT & Programming > Programming Languages MCQs > Caching Application Pages And Data MCQs

Caching Application Pages And Data MCQ

What types of data can you store in the Cache collection?

Answer

Correct Answer: You can store any type of data in the Cache collection

Note: This Question is unanswered, help us to find answer for this one

By default, when you use Page Output Caching, at what location page is cached?

Answer

Correct Answer: Web server, any proxy servers, and browser

Note: This Question is unanswered, help us to find answer for this one

The type of parameter supported by OutputCache is/are?

Answer

Correct Answer: All

Note: This Question is unanswered, help us to find answer for this one

What is the use of VaryByParam attribute in OutputCache directive?

Answer

Correct Answer: The VaryByParam attribute determines which versions of the page output are actually cached

Note: This Question is unanswered, help us to find answer for this one

How many types of caching ASP.NET supports?

Answer

Correct Answer: All

Note: This Question is unanswered, help us to find answer for this one

How will you specifying the Cache Location?

Answer

Correct Answer:

You can use the Location attribute of the <%@ OutputCache %> directive to specify where a page is cached


Note: This Question is unanswered, help us to find answer for this one

If you want to cache the page according to the browser, then what will you do?

Answer

Correct Answer:

Write the given below code in aspx page.

<%@ OutputCache Duration=”500” VaryByParam=”none” VaryByCustom=”browser” %>



Note: This Question is unanswered, help us to find answer for this one

According to the given below statements, choose the correct option.

Statement 1: Application caching is the process of storing data (and not pages) in a cache object.

Statement 2: Page output caching stores a rendered page, portion of a page, or version of a page in memory.

Statement 3: Caching reduces the time required to render cached page in future requests


Answer

Correct Answer:

All statements are correct


Note: This Question is unanswered, help us to find answer for this one

What code you will write for using the cache object?

Answer

Correct Answer:

 // Storing the value.

Cache["name"]="CareerRide";


// Retrieving the value on any webpage within the application.


if (Cache["name"] != null)

Label1.Text= Cache["name"].ToString();



Note: This Question is unanswered, help us to find answer for this one

You want to enable Page Output Caching in ASP.NET. What code you will write in ASPX page.

Answer

Correct Answer:

 <%@ OutputCache Duration="30" VaryByParam="none" %>



Note: This Question is unanswered, help us to find answer for this one

How many types of Cache Dependencies are available in ASP.NET?

Answer

Correct Answer: All

Note: This Question is unanswered, help us to find answer for this one

You need to programmatically configure page output caching. Which object would you use?

Answer

Correct Answer: Response

Note: This Question is unanswered, help us to find answer for this one