Advance Caching Techniques Keen Haynes MKAD SCCFUG Winter 2002 Conference.

Slides:



Advertisements
Similar presentations
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 6 Managing and Administering DNS in Windows Server 2008.
Advertisements

Microsoft Excel 2003 Illustrated Complete Excel Files and Incorporating Web Information Sharing.
In ColdFusion Caching & Performance Why is my code so slow? Muahahaha! I just bit a byte! Presented By Denard Springle NVCFUG June 2011.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
Fast Track to ColdFusion 9. Getting Started with ColdFusion Understanding Dynamic Web Pages ColdFusion Benchmark Introducing the ColdFusion Language Introducing.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Hands-On Microsoft Windows Server 2003 Networking Chapter 7 Windows Internet Naming Service.
Implementing ISA Server Caching. Caching Overview ISA Server supports caching as a way to improve the speed of retrieving information from the Internet.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 7: Planning a DNS Strategy.
1 Chapter Overview Understanding Windows Name Resolution Using WINS.
1 Chapter Overview Creating User and Computer Objects Maintaining User Accounts Creating User Profiles.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Module 7: Configuring TCP/IP Addressing and Name Resolution.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
1 Web Server Concepts Dr. Awad Khalil Computer Science Department AUC.
CHAPTER 12 COOKIES AND SESSIONS. INTRO HTTP is a stateless technology Each page rendered by a browser is unrelated to other pages – even if they are from.
CSC 2720 Building Web Applications Cookies, URL-Rewriting, Hidden Fields and Session Management.
Server-side Scripting Powering the webs favourite services.
4-1 INTERNET DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
ColdFusion Performance Tuning Keen Haynes Certified ColdFusion Developer.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
Tutorial 10 Adding Spry Elements and Database Functionality Dreamweaver CS3 Tutorial 101.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
Implementing ISA Server Publishing. Introduction What Are Web Publishing Rules? ISA Server uses Web publishing rules to make Web sites on protected networks.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 7: Domain Name System.
Module 10: Configuring Windows XP Professional to Operate in Microsoft Networks.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
What’s New in CF 8 Admin MDCFUG 8/14/2007 Ajay Sathuluri Sr. Web and Database Engineer TeraTech Inc.
Advanced Web Forms with Databases Programming Right from the Start with Visual Basic.NET 1/e 13.
WaveMaker Visual AJAX Studio 4.0 Training Authentication.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 21 - Web Servers (IIS, PWS and Apache) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3.
Web Design and Development for E-Business By Jensen J. Zhao Copyright 2003 Prentice Hall, Inc. Web Design and Development for E-Business Jensen J. Zhao.
Database-Driven Web Sites, Second Edition1 Chapter 5 WEB SERVERS.
IS 221: DATABASE ADMINISTRATION Lecture 6:Create Users & Manage Users. Information Systems Department 1.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
1 Maryland ColdFusion User Group Session Management December 2001 Michael Schuler
Module 4 : Installation Jong S. Bok
Dr. Mustafa Cem Kasapbaşı Security in ASP.NET. Determining Security Requirements Restricted File Types.
Caching Chapter 12. Caching For high-performance apps Caching: storing frequently-used items in memory –Accessed more quickly Cached Web Form bypasses:
Chapter 6 Server-side Programming: Java Servlets
Improving Database Performance Derrick Rapley
ASP.NET Caching - Pradeepa Chandramohan. What is Caching? Storing data in memory for quick access. In Web Application environment, data that is cached.
STATE MANAGEMENT.  Web Applications are based on stateless HTTP protocol which does not retain any information about user requests  The concept of state.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
CF101: Welcome to ColdFusion Simon Horwith CTO, Etrilogy Ltd.
AxKit A member of the Apache XML project Ryan Maslyn Kyle Bechtel.
Caching for Performance Jeff Tapper Tapper.net Consulting.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
Fig Leaf Software CF 5 Review Steve Drucker CEO Fig Leaf Software.
1 Chapter Overview Managing Object and Container Permissions Locating and Moving Active Directory Objects Delegating Control Troubleshooting Active Directory.
Copyright © 2006, Infinite Campus, Inc. All rights reserved. User Security Administration.
PubMed/Limits and Advanced Search (module 4.2). MODULE 4.2 PubMed/Limits & Advanced Search Instructions - This part of the:  course is a PowerPoint demonstration.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
WEB SERVER SOFTWARE FEATURE SETS
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Module 5: Managing Content. Overview Publishing Content Executing Reports Creating Cached Instances Creating Snapshots and Report History Creating Subscriptions.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
Chapter Overview Understanding Windows Name Resolution Using WINS.
Module Overview Installing and Configuring a Network Policy Server
Data Virtualization Tutorial… LDAP Domains in CIS
Configuring Internet-related services
Nate Nelson I*LEVEL, Inc.
Presentation transcript:

Advance Caching Techniques Keen Haynes MKAD SCCFUG Winter 2002 Conference

Introduction What is caching? Why is it important to me? What can I cache? How do I leverage caching

Introduction (cont.) Template Cache Trusted Cache Database Connection Cache or Pooling Query Caching

Template Cache Cache the HTML generated by a template Cache for a specified period Caching can be client-side, server-side or both

Speeds up page rendering when dynamic content does not have to be retrieved each time a user accesses the page. To accomplish this, cfcache creates temporary files that contain the static HTML returned from a ColdFusion page.

(cont.) <cfcache action = "cache" or "flush" or "clientCache" or "optimal" username = "username" password = "password" protocol = "protocol name" timeout = “timeout date-time" directory = "directory name for map file" cacheDirectory =“directory name for cached pages" expireURL = "wildcarded URL reference" port = "port-number">

(cont.) Client-side caching <CFCACHE ACTION=“CLIENTCACHE” Server-side caching <CFCACHE ACTION=“CACHE” Optimal – combination of client & server <CFCACHE ACTION=“OPTIMAL” Refresh a cached page <CFCACHE ACTION=“FLUSH”

(cont.) <CFCACHE ACTION=“CACHE” TIMEOUT=“#DateAdd(“h”, “-4”, Now())#”> <CFCACHE ACTION=“FLUSH” EXPIREURL=“Customer.cfm?*”

Trusted Cache When checked, any requested files found to currently reside in the template cache will not be inspected for potential updates – recommended for sites that do not update during the life of the server.

Trusted Cache (cont.) Refreshing the template cache –Uncheck the 'Trusted Cache' option in the ColdFusion Administrator. –Click Apply. –Check the "Trusted Cache" option. –Click Apply.

Caching and CF Admin

Database Connection Caching If "Maintain Database Connections" is enabled for a data source, CF keeps the connection open after its first connection to the database. It does not log out of the database after this first connection. Will create a new connection if a request is using a data source connection that is already opened, and another request is received The connection pool can increase up to the setting for simultaneous connections limit which is set for each data source.

Database Connection Caching (cont.)

Caching and database queries What does ColdFusion do when it sees a query? Cachedwithin Cachedafter

Caching and database queries (cont) What does ColdFusion do when it sees a query? –Passes SQL content to appropriate driver (handled by a thread) –Waits for results to return before processing rest of tag –Will use existing instance of driver if data source already in use –Will cache connection information if “Maintain Database Connections” is selected

Caching and database queries (cont) <CFQUERY Name=“States” DATASOURCE=“test” CACHEDWITHIN=#CreateTimeSpan(0,1,0,0)#> SELECT state_name FROM tbl_state CACHEDWITHIN (TIMESPAN) – caches the query results for a specified time CACHEDAFTER (DATE) – caches the query based on a particular date and time

Caching and database queries (cont) <CFQUERY Name=“us_states” DATASOURCE=“States” SELECT * FROM us_states ORDER BY State

Caching and database queries (cont) <CFQUERY Name=“us_states” DATASOURCE=“States” CACHEDWITHIN=#CreateTimeSpan(0,1,0,0)#> SELECT * FROM us_states ORDER BY State

Caching and database queries (cont) Points to remember: Queries are cached on a server-wide basis Documentation states query must use same SQL statement, data source, query name, user name, password, and DBTYPE (I did not find this to be true for query name ) SQL statements must be exactly the same – this includes even tabbing

Caching and database queries (cont) <CFQUERY Name=“States” DATASOURCE=“test” CACHEDWITHIN=#CreateTimeSpan(0,1,0,0)#> SELECT state_name FROM tbl_state IS NOT THE SAME QUERY AS <CFQUERY Name=“States” DATASOURCE=“test2” CACHEDWITHIN=#CreateTimeSpan(0,1,0,0)#> SELECT state_name FROM tbl_state

Caching and database queries (cont) <CFQUERY Name=“States” DATASOURCE=“test” CACHEDWITHIN=#CreateTimeSpan(0,1,0,0)#> SELECT state_name FROM tbl_state IS NOT THE SAME QUERY AS <CFQUERY Name=“States” DATASOURCE=“test” CACHEDWITHIN=#CreateTimeSpan(0,1,0,0)#> SELECT state_name FROM tbl_state

Caching and database queries (cont) <cfquery name="us_states" datasource="States" CACHEDWITHIN=#CreateTimeSpan(0,1,0,0)#> SELECT * (Note: tabbing) FROM us_states ORDER BY State

Caching and database queries (cont) More points to remember: Queries containing dynamic values will result in an instance of each record setting being cached Max limit of 100 cached queries was removed with CF4.5 Cached queries will not reflect changes to the database until the cache interval has expired.

Caching and database queries (cont) Forcing an update of cached queries This can be accomplished by following queries that effect changes with a CFQUERY that contains a negative CACHEDWITHIN value <CFQUERY Name=“Customers” DATASOURCE=“test” CACHEDWITHIN=#CreateTimeSpan(0,0,0,-1)#> SELECT customer_name FROM tbl_customer

Caching and database queries (cont) UPDATE <CFQUERY Name=“Customers” DATASOURCE=“test” CACHEDWITHIN=#CreateTimeSpan(0,0,0,-1)#> SELECT customer_name FROM tbl_customer

Advance Security Caching and CF Admin Security Server Policy Store Cache caches Advanced security information. By default, it is notified of administrative changes to the policy store once every minute. Using this cache provides the most noticeable performance improvements with Advanced security. Security Server Authorization Cache caches each unique isAuthorized call. ColdFusion Server Cache caches isAuthorized and isProtected requests.

Advance Security Caching and CF Admin (cont.)

The CFML Language Reference ommits[sic] a new ColdFusion Server 5 tag, cfobjectcache. It clears, or flushes, the entire query cache. The action attribute must be set to clear. No other values are supported. ML_Reference/Tags78.jsp# http://livedocs.macromedia.com/cf50docs/CF ML_Reference/Tags78.jsp#

Summary Things to consider –Overhead –Need for “current” information Identify candidates for caching – both long running and frequently called queries and templates Testing to verify expected results

?