Caching FAQ's

Q: What is caching?

Ans: Holding output of webpage temporarily at client or at server are called as caching

Q: What are different categories of caching?

Ans: There are two categories of caching

  1. Client side caching:

Holding output of webpage at client system is called as client side caching.
Advantage: Number of round trips to server from client can be reduced.                  

  1. Server side caching:

Holding output of webpage at server system is called as server side caching.
Advantage: Number of page lifecycles can be reduced, so that request response time can be reduced.

Q: What are the different types of caching in asp.net?

Ans: There are three types of caching

  1. Output caching:
  • ?Complete output of webpage will be maintained at client or at server for a specified amount of time.
  • There are two types of output caching
  • Single output caching: Only one output for page will be maintained.
  • Multi Output caching: We can maintain multiple outputs of same page in cache due to some cange in input given by user.
  1. Frgment caching:
  • If only some part of webpage output is cached then it is called as fragment caching    
  • Fragment caching can be implemented by using Webuser control and Substitution control                
  1. DataCaching:
  • If Data is stored in cache then it is called as data caching.
  • Data Stored in cache can be accessed in any webpage and for any client.

Q: What are the types of output caching?

Ans: There are two types of output caching

  1. Single output caching: Only one output for page will be maintained.
  2. Multi output caching: We can maintain multiple outputs of same page in cache due to some cange in input given by user.

Q: What is fragment caching and is it possible to implement it at client side?

Ans: If only some part of webpage output is cached then it is called as fragment caching

  • It can not be implemented at client side,it is possible at server only

Q: How to implement fragment caching?

Ans: Fragment caching can be implemented by using Web user control and Substitution control.

Q: What is data caching?

Ans: If Data is stored in cache then it is called as data caching. Data stored in cache can be accessed in any webpage and for any client.

Q: What are the different types of expiry for Data caching?

Ans: There are two expiry mechanisms

  1. Time based expiry: There are two types of time based expiry
    1. Absolute time expiration:
      • ??Data will be existing for a specified amount of time only, once time period has been completed automatically data is removed.
    2. Sliding time expiration:
      • Expiry time will be automatically extended based  on the data access.if time period is 20sec, and no request for 20 secs then data will be removed. If there is a request at 10th sec, then time period will be extended for 20 secs.
  2. File based expiry: Data will be existing in the cache until one of file content has been modified. Once file content has been modified automatically data will be removed.

Q: What AggregateCacheDependency?

Ans: It is introduced from asp.net 2.0. If Data cache expiry dependents upon state of mupltiple files then it will be called as Aggregate Cache Dependency.

Q: Where do you find usage of Data Caching?

Ans:

  • While dealing with company quarter results, DataSet can be maintained in Cache.
  • In news website common news will be maintained in Cache.

Q: What is the advantage of Caching?

Ans:

  • It can be used as performance tuning technique.
  • Number of round trips to server can be reduced.
  • Number of page lifecycles can be reduced.

Q: Is it possible to implement data caching at client?

Ans: No, it will be possible at server only.

Q: Where the  memory for cache is allocated?

Ans: As part of appDomain of website. .i.e., in the process memory of  asp.net worker process.

Q: How much data can be stored in cache?

Ans: No limit.