SlideShare a Scribd company logo
1 of 10
Catching in C#
Presented by:
Bhumika
Kaushal Agarwal
Presented to:
Prof. Madhuraj Narwaria
Content:
• Introduction
• What a Cache does
• Types of Catching
Introduction:
• Caching is a technique of storing frequently used
data/information in memory, so that, when the same
data/information is needed next time, it could be
directly retrieved from the memory instead of being
generated by the application.
• Caching places frequently used data in quickly accessed media such as the
random access memory of the computer. The ASP.NET runtime includes a
key-value map of CLR objects called cache. This resides with the application and
is available via the HttpContext and System.Web.UI.Page.
• The data will not be available in the following cases:
• If its lifetime expires
• If the application releases its memory
• If caching does not take place for some reason
You can access items in the cache using an indexer and may control the lifetime
of objects in the cache and set up links between the cached objects and their
physical sources.
Continue:
What a Cache does
• A cache simply stores the output
generated by a page in the
memory and this saved output (cache)
will serve us (users) in the future.
Types of Catching
Page Caching
• When we compile our code it is first it compiled into Microsoft Int
ermediate Language (MSIL) then The MSIL is converted into Native
Code using the JIT Compiler. Now if there is a page that changes fr
equently then the JIT needs to compile it every time. So, rather tha
n generate a page on each request we can cache the page using Pa
ge Output Caching so that it can be accessed from the cache itself.
< %@OutputCache Duration= "60" VaryByParam= "DepartmentI
d"% >
All the attributes that we specify in an OutputCache directive are u
sed to populate an instance of the System.Web.HttpCachePolicy cl
ass. Moreover, It is good if the website is fairly static.
Page Fragment Caching
• ASP.NET provides a mechanism for caching portions of pages,
called page fragment caching . For example: user control. To ca
che a portion of a page, you must first encapsulate the portion
of the page you want to cache into a user control . In the user
control source file, add an OutputCache directive specifying the
Duration and VaryByParam attributes. When that user control is
loaded into a page at runtime , it is cached, and all subsequent
pages that reference that same user control will retrieve it from
the cache.
Data Caching
• Data Caching is used to fetch the information of an application quickly based o
n the requirements. Cache object is just like application object which can be acc
ess anywhere in the application. The lifetime of the cache is equivalent to the lif
etime of the application. Caching data can dramatically improve the performance
of an application by reducing database contention and round-trips .
THANK YOU

More Related Content

Similar to catching in c#.pptx

aksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkhaksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkhelodiaevie
 
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdfaskldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdfelodiaevie
 
salkdjfhdjkghdfkjh
salkdjfhdjkghdfkjhsalkdjfhdjkghdfkjh
salkdjfhdjkghdfkjhelodiaevie
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questionsAkhil Mittal
 
Academy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storageAcademy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storageBinary Studio
 
Introducing windows server_app_fabric
Introducing windows server_app_fabricIntroducing windows server_app_fabric
Introducing windows server_app_fabricMarco Titta
 
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...Impetus Technologies
 
OCCI Specification Walkthrough
OCCI Specification WalkthroughOCCI Specification Walkthrough
OCCI Specification Walkthroughbefreax
 
IEEE KUET SPAC presentation
IEEE KUET SPAC  presentationIEEE KUET SPAC  presentation
IEEE KUET SPAC presentationahsanmm
 

Similar to catching in c#.pptx (20)

aksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkhaksdfhaskdjfhasdjkh
aksdfhaskdjfhasdjkh
 
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdfaskldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
askldjfhaskdfj aslkdjfhaskdfhasjk askldf ashkdf
 
aergserga
aergsergaaergserga
aergserga
 
sergaerwga
sergaerwgasergaerwga
sergaerwga
 
salkdjfhdjkghdfkjh
salkdjfhdjkghdfkjhsalkdjfhdjkghdfkjh
salkdjfhdjkghdfkjh
 
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
Aspnet Caching
Aspnet CachingAspnet Caching
Aspnet Caching
 
Academy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storageAcademy PRO: HTML5 Data storage
Academy PRO: HTML5 Data storage
 
ASP.NET Lecture 7
ASP.NET Lecture 7ASP.NET Lecture 7
ASP.NET Lecture 7
 
Introducing windows server_app_fabric
Introducing windows server_app_fabricIntroducing windows server_app_fabric
Introducing windows server_app_fabric
 
Caching By Nyros Developer
Caching By Nyros DeveloperCaching By Nyros Developer
Caching By Nyros Developer
 
Ror caching
Ror cachingRor caching
Ror caching
 
Caching in Kentico 11
Caching in Kentico 11Caching in Kentico 11
Caching in Kentico 11
 
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
 
OCCI Specification Walkthrough
OCCI Specification WalkthroughOCCI Specification Walkthrough
OCCI Specification Walkthrough
 
IEEE KUET SPAC presentation
IEEE KUET SPAC  presentationIEEE KUET SPAC  presentation
IEEE KUET SPAC presentation
 
Unit5 servlets
Unit5 servletsUnit5 servlets
Unit5 servlets
 

Recently uploaded

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 

Recently uploaded (20)

The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 

catching in c#.pptx

  • 1. Catching in C# Presented by: Bhumika Kaushal Agarwal Presented to: Prof. Madhuraj Narwaria
  • 2. Content: • Introduction • What a Cache does • Types of Catching
  • 3. Introduction: • Caching is a technique of storing frequently used data/information in memory, so that, when the same data/information is needed next time, it could be directly retrieved from the memory instead of being generated by the application.
  • 4. • Caching places frequently used data in quickly accessed media such as the random access memory of the computer. The ASP.NET runtime includes a key-value map of CLR objects called cache. This resides with the application and is available via the HttpContext and System.Web.UI.Page. • The data will not be available in the following cases: • If its lifetime expires • If the application releases its memory • If caching does not take place for some reason You can access items in the cache using an indexer and may control the lifetime of objects in the cache and set up links between the cached objects and their physical sources. Continue:
  • 5. What a Cache does • A cache simply stores the output generated by a page in the memory and this saved output (cache) will serve us (users) in the future.
  • 7. Page Caching • When we compile our code it is first it compiled into Microsoft Int ermediate Language (MSIL) then The MSIL is converted into Native Code using the JIT Compiler. Now if there is a page that changes fr equently then the JIT needs to compile it every time. So, rather tha n generate a page on each request we can cache the page using Pa ge Output Caching so that it can be accessed from the cache itself. < %@OutputCache Duration= "60" VaryByParam= "DepartmentI d"% > All the attributes that we specify in an OutputCache directive are u sed to populate an instance of the System.Web.HttpCachePolicy cl ass. Moreover, It is good if the website is fairly static.
  • 8. Page Fragment Caching • ASP.NET provides a mechanism for caching portions of pages, called page fragment caching . For example: user control. To ca che a portion of a page, you must first encapsulate the portion of the page you want to cache into a user control . In the user control source file, add an OutputCache directive specifying the Duration and VaryByParam attributes. When that user control is loaded into a page at runtime , it is cached, and all subsequent pages that reference that same user control will retrieve it from the cache.
  • 9. Data Caching • Data Caching is used to fetch the information of an application quickly based o n the requirements. Cache object is just like application object which can be acc ess anywhere in the application. The lifetime of the cache is equivalent to the lif etime of the application. Caching data can dramatically improve the performance of an application by reducing database contention and round-trips .