26.02.2015 Views

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

(A) What is scavenging ?<br />

When server running your ASP.<strong>NET</strong> application runs low on memory resources , items<br />

are removed from cache depending on cache item priority.cache item priority is set when<br />

you add item to cache.BY setting the cache item priority controls which items scavenging<br />

is removed first.<br />

(B) What are different types of caching using cache object of ASP.<strong>NET</strong>?<br />

You can use two types of output caching to cache information that is to be transmitted to<br />

and displayed in a Web browser:<br />

√<br />

Page Output Caching<br />

Page output caching adds the response of page to cache object.Later when<br />

page is requested page is displayed from cache rather than creating the<br />

page object and displaying it.Page output caching is good if the site is<br />

fairly static.<br />

√<br />

Page Fragment Caching<br />

If parts of the page are changing, you can wrap the static sections as user<br />

controls and cache the user controls using pagefragment caching.<br />

(B) How can you cache different version of same page using ASP.<strong>NET</strong><br />

cache object ?<br />

Output cache functionality is achieved by using “OutputCache” attribute on ASP.<strong>NET</strong><br />

page header.Below is the syntax<br />

<br />

√<br />

√<br />

VaryByParam :- Caches different version depending on input parameters send<br />

through HTTP POST/GET.<br />

VaryByHeader:- Caches different version depending on the contents of the<br />

page header.<br />

90

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!