Thursday, January 15, 2009

Interview Questions - Part 9

Interview Questions
--------------------------
86. What is caching?
a ) This allows a way to keep most frequently used data in memory to increase the performance of the application.

87. What are the types of page output cache?
a ) This is used to store the contents of a processed page in memory.
It is devided in to 2 types
1. full page caching
it stores the entire contents of a page
2. partial page caching
it stores the parts of a page.

88. What do you mean by post-cache substitution?
a ) This is one type of partial page caching. It allows you to cache the entire page but parts of a page are not cached means they will be created dynamically.

89. When the items will be removed from the cache?
a ) Items from cache are removed
1. when memory runs low
2. when an item expires
3. when items dependency changes

90. What is Sliding expiration?
a ) Suppose an item is placed in cache and its sliding expiration is 10 minutes. Then this sliding expiration policy specifies that the item stored in cache will be removed after 10 min from the time it is last used/accessed.

91. What is Absolute expiration?
a ) Suppose an item is placed in cache and its absolute expiration is 5 pm. Then this absolute expiration policy specifies that the item will be removed from the cache after 5 pm.

92. What is the directive used to implement caching in a page?
a ) It is @OutputCache

93. What is the attribute used to set the expiration of an item in the cache?
a ) It is “Duration” attribute

94. What are the attributes of outputcache used to store multiple versions of a page?
a )
1. VaryByParam
Using querystring it enables you to cache multiple versions of a page
2. varyByControl
Using a control value it enables you to cache multiple versions of a page
3. VaryByHeader
Using requests http header it enables you to cache multiple versions of a page
4. VaryByCustom
Using custom string or browser type it enables you to cache multiple versions of a page

95. what is sql dependency in caching?
a ) Means an item in the cache depends on the changes in a table in sql Database.

No comments:

Post a Comment