SlideShare a Scribd company logo
Lucee Caching Strategies
Gert Franz
Rasia GmbH
WHO AM I?
• Gert Franz
– Involved with Lucee and Railo since day 1
– Into CFML for 17 years
– DBA, System architect
– CFML Passionate
• Rasia is founding Member of the
Lucee Association
MY EVOLUTION
Assembler  Basic  Clipper  Pascal  Delphi  Java  CFML  Lucee
WHO AM I?
• Studied Astrophysics in Munich
• Basic, dBase, Clipper, Visual Basic, Delphi, Java
• Performance, DB & Code Tuning is my professional
Hobby
• I live in Switzerland
• Lucee training, consulting, support etc.
Caching strategies with lucee
Caching strategies with lucee
WHY?
• Many server side operations are time
consuming
– Database, function calls, CFCs, CFHTTP, web services
– "It works on my machine" effect
– Tons of traffic make it necessary
So clearly
Caching makes sense
CACHING UPS AND DOWNS
• Pro’s
– Well yes, can’t really get faster than that
– Mostly depends on the storage mechanism
– Obviously RAM is the best location
CACHING UPS AND DOWNS
• Con’s
– Well the only downside is the topicality / relevance
of the data.
OK GOT IT, CFML HOW, WHAT?
• Your server is the clerk
• It waits for requests
• It checks places to retreive information
• It takes time to do so
SO HOW DOES THIS LOOK LIKE
Caching strategies with lucee
CACHES  DRIVERS
• Cache in Lucee is an interface  what and
where can I cache
• Drivers are how you can store the data cached
Caching strategies with lucee
AVAILABLE CACHES
• PagePool
• Object
• Template
• Function
• Include
• HTTP
• Query
• Webservice
• File
• Other
Caching strategies with lucee
AVAILABLE DRIVERS
• RAM
• EHCache
• EHCache Remote
• Mongo DB
• Redis
• Couchbase *
• Memcached
• Database
• Infinispan
Caching strategies with lucee
PAGEPOOL CACHE
• Used whenever Lucee is supposed to execute
a .cfm file
• Choose between never, once and always
• Data in cache can be listed (pagePoolList())
• Data can be cleared (pagePoolClear())
• Can not be used with a driver
PAGEPOOL CACHE
Caching strategies with lucee
OBJECT CACHE
• Cache used with cacheGet() cachePut() etc.
• Is also used with the tag cfcache action
get/put
• Can be used with any driver
Caching strategies with lucee
TEMPLATE CACHE
• Cache used with tag cfcache actions
– Content
– Cache
– serverCache
• Can be used with any driver
Caching strategies with lucee
FUNCTION CACHE
• You can use the attribute cachedwithin for
functions
• Deterministic functions can be cached
• Function will NOT be executed,
• return value will be returned and content will
be generated
• Can be stored with any driver
FUNCTION CACHE EXAMPLE
struct function calcEnvironment(required string sUserAgent)
cachedWithin="0.1" {
some regexp stuff
some db stuff
return stEnv;
}
Caching strategies with lucee
INCLUDE CACHE
• I guess we were smoking pot when we
designed this
• Includes can be cached. Prevents execution
and cached content will be rendered
(functionality is IMHO incomplete)
• Can be stored with any driver
FUNCTION CACHE EXAMPLE
include "myFile.cfm" cachedWithin="0.1";
Caching strategies with lucee
HTTP CACHE
• The implementation is quite useful since
CFHTTP calls are very time consuming
• Just add the cachedwithin attribute to it
• It will cache the CFHTTP.fileContent
• Can be stored with any driver
FUNCTION CACHE EXAMPLE
http url="http://www.google.com" cachedWithin="0.1";
Caching strategies with lucee
WEBSERVICE CACHE
• Is a new type of cache which allows you to
cache web services
• Just add cachedwithin to the cfinvoke call
• Can be stored with any driver
Caching strategies with lucee
FILE CACHE
• Is a new type of cache which allows you to
cache file actions
• Just add cachedwithin to the cffile call
• In addition the file functions allow the
argument as well
• Can be stored with any driver
Caching strategies with lucee
HONORABLE MENTIONS
Caching strategies with lucee
QUERY CACHE
• For sure the most used caching feature
• Uses the sql, the params and the datasource
as keys
• Can be stored with any driver
QUERY CACHE EXAMPLE
qRet = queryExecute(
sql:"SELECT TOP 10 name, zip FROM customers",
options: {
cachedWithin:0.1
datasource:"test",
tags: ["Test1", "Test2"]
}
);
QUERY CACHE EXAMPLE
objectCache action="clear" tags="Test1";
QUERY CACHE UNDER THE HOOD
• Lucee stores the result of the query in the
cache
• It creates a hash of the SQL, the params and
the other attributes
• When the time is up, the cached element will
be removed from cache
QUERY CACHE UNDER THE HOOD
• When the query is reexecuted Lucee will
return a pointer to the cached query
• It will always be a pointer to the query
UNLESS…?
Caching strategies with lucee
CACHING UNDER LOAD
• Caching often helps solving performance
problems
Caching strategies with lucee
THE PROBLEM UNDER LOAD
• Do you really know how the application is used
• Without tons of logging
• Without DB profiler turned on
• Without Application monitoring
• Without accumulation of data
?
Caching strategies with lucee
LEGACY APPLICATIONS
• Old, not perfectly maintained
• Take a lot of time to investigate (Missing
knowledge)
• Perhaps not worth rewriting
• Old developer perhaps not available
• Memory hog
• Complex and large
• Hard to tune  Expensive to tune
Caching strategies with lucee
HOW TO TUNE A LEGACY
APPLICATION
• Invest many resources
• Build up knowledge
• Have an expert look at the code
• Rewrite the whole app
• In short  it is expensive
ARGUSCACHE
The best way to speed up your apps
• Designed for existing applications
• Analyzes the application behavior
• Analyzes the resources used
• Runs in the background
Here comes ARGUSCACHE
• Allows you to see what's going on
• Shows you whether you have potentioal
for optimization
• Shows you the potential performance gain
ARGUSCACHE dashboard
The dashboard
• Running in the cloud
• Handling clusters
• Handling many web contexts
• Nice dashboard to manage everything
Current development
• 99.- US$ / month per context
• CFCamp Promo for early signups and
testers
• Site licence available
• Higher Discounts for support contract
customers
Pricing
Caching strategies with lucee
TALK TO ME / US
• Come see me or Micha at the Lucee booth
• Contact us gert@rasia.ch, michael@rasia.ch
• Challenge your application
• Get highly dicounted license of ArgusCache
Ad

More Related Content

What's hot (17)

Drupal 7 performance and optimization
Drupal 7 performance and optimizationDrupal 7 performance and optimization
Drupal 7 performance and optimization
Shafqat Hussain
 
20110701 zsc2011-advanced proxying-formatted
20110701 zsc2011-advanced proxying-formatted20110701 zsc2011-advanced proxying-formatted
20110701 zsc2011-advanced proxying-formatted
Zarafa
 
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
BIOVIA
 
Roll your own FOSS cloud hosting
Roll your own FOSS cloud hostingRoll your own FOSS cloud hosting
Roll your own FOSS cloud hosting
Russell Searle
 
SAP Host Agent x509 authentication
SAP Host Agent x509 authenticationSAP Host Agent x509 authentication
SAP Host Agent x509 authentication
Aliter Consulting
 
Configuration Management in WordPress
Configuration Management in WordPressConfiguration Management in WordPress
Configuration Management in WordPress
Edmund Turbin
 
Benchmarking like a pro
Benchmarking like a proBenchmarking like a pro
Benchmarking like a pro
Gianluca Sartori
 
Aem offline content
Aem offline contentAem offline content
Aem offline content
Ashokkumar T A
 
Double Sync Replication
Double Sync ReplicationDouble Sync Replication
Double Sync Replication
Lixun Peng
 
Tutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppTutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xampp
Lailani Fitria
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
Sascha Möllering
 
Time Machine
Time MachineTime Machine
Time Machine
Lixun Peng
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKA
Johan Edstrom
 
SCCI'15 - Devology - Session 6 - Servers and PHP
SCCI'15 - Devology - Session 6 - Servers and PHPSCCI'15 - Devology - Session 6 - Servers and PHP
SCCI'15 - Devology - Session 6 - Servers and PHP
SCCI-CU
 
SAP LVM Custom Instances
SAP LVM Custom InstancesSAP LVM Custom Instances
SAP LVM Custom Instances
Aliter Consulting
 
Governor limits
Governor limitsGovernor limits
Governor limits
Shivanath Devinarayanan
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
Thomas Daly
 
Drupal 7 performance and optimization
Drupal 7 performance and optimizationDrupal 7 performance and optimization
Drupal 7 performance and optimization
Shafqat Hussain
 
20110701 zsc2011-advanced proxying-formatted
20110701 zsc2011-advanced proxying-formatted20110701 zsc2011-advanced proxying-formatted
20110701 zsc2011-advanced proxying-formatted
Zarafa
 
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
(ATS6-DEV06) Using Packages for Protocol, Component, and Application Delivery
BIOVIA
 
Roll your own FOSS cloud hosting
Roll your own FOSS cloud hostingRoll your own FOSS cloud hosting
Roll your own FOSS cloud hosting
Russell Searle
 
SAP Host Agent x509 authentication
SAP Host Agent x509 authenticationSAP Host Agent x509 authentication
SAP Host Agent x509 authentication
Aliter Consulting
 
Configuration Management in WordPress
Configuration Management in WordPressConfiguration Management in WordPress
Configuration Management in WordPress
Edmund Turbin
 
Double Sync Replication
Double Sync ReplicationDouble Sync Replication
Double Sync Replication
Lixun Peng
 
Tutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xamppTutorial sederhana netbeans & xampp
Tutorial sederhana netbeans & xampp
Lailani Fitria
 
Using Apache Camel as AKKA
Using Apache Camel as AKKAUsing Apache Camel as AKKA
Using Apache Camel as AKKA
Johan Edstrom
 
SCCI'15 - Devology - Session 6 - Servers and PHP
SCCI'15 - Devology - Session 6 - Servers and PHPSCCI'15 - Devology - Session 6 - Servers and PHP
SCCI'15 - Devology - Session 6 - Servers and PHP
SCCI-CU
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
Thomas Daly
 

Similar to Caching strategies with lucee (20)

DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalability
cherryhillco
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talk
Bryan Ollendyke
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
Chapter Three
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
Piyuesh Kumar
 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use cases
satejsahu
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it Fast
Barry Jones
 
Apache Content Technologies
Apache Content TechnologiesApache Content Technologies
Apache Content Technologies
gagravarr
 
CI_CONF 2012: Scaling - Chris Miller
CI_CONF 2012: Scaling - Chris MillerCI_CONF 2012: Scaling - Chris Miller
CI_CONF 2012: Scaling - Chris Miller
The Huffington Post Tech Team
 
CI_CONF 2012: Scaling
CI_CONF 2012: ScalingCI_CONF 2012: Scaling
CI_CONF 2012: Scaling
Chris Miller
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
Gabi Lee
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
Achievers Tech
 
Top ten-list
Top ten-listTop ten-list
Top ten-list
Brian DeShong
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
Graham Weldon
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Konstantin Gredeskoul
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
Kirk Madera
 
Technologies for Data Analytics Platform
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics Platform
N Masahiro
 
Custom coded projects
Custom coded projectsCustom coded projects
Custom coded projects
Marko Heijnen
 
Hashicorp at holaluz
Hashicorp at holaluzHashicorp at holaluz
Hashicorp at holaluz
Ricard Clau
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011
Brian Ritchie
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
Jurriaan Persyn
 
DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalability
cherryhillco
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talk
Bryan Ollendyke
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
Chapter Three
 
Intro to Service Worker API and its use cases
Intro to Service Worker API and its use casesIntro to Service Worker API and its use cases
Intro to Service Worker API and its use cases
satejsahu
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it Fast
Barry Jones
 
Apache Content Technologies
Apache Content TechnologiesApache Content Technologies
Apache Content Technologies
gagravarr
 
CI_CONF 2012: Scaling
CI_CONF 2012: ScalingCI_CONF 2012: Scaling
CI_CONF 2012: Scaling
Chris Miller
 
Drupal performance
Drupal performanceDrupal performance
Drupal performance
Gabi Lee
 
Profiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty DetailsProfiling and Tuning a Web Application - The Dirty Details
Profiling and Tuning a Web Application - The Dirty Details
Achievers Tech
 
CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011CakePHP 2.0 - PHP Matsuri 2011
CakePHP 2.0 - PHP Matsuri 2011
Graham Weldon
 
12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL12-Step Program for Scaling Web Applications on PostgreSQL
12-Step Program for Scaling Web Applications on PostgreSQL
Konstantin Gredeskoul
 
They why behind php frameworks
They why behind php frameworksThey why behind php frameworks
They why behind php frameworks
Kirk Madera
 
Technologies for Data Analytics Platform
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics Platform
N Masahiro
 
Custom coded projects
Custom coded projectsCustom coded projects
Custom coded projects
Marko Heijnen
 
Hashicorp at holaluz
Hashicorp at holaluzHashicorp at holaluz
Hashicorp at holaluz
Ricard Clau
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011
Brian Ritchie
 
Introduction to memcached
Introduction to memcachedIntroduction to memcached
Introduction to memcached
Jurriaan Persyn
 
Ad

Recently uploaded (20)

Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Solidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license codeSolidworks Crack 2025 latest new + license code
Solidworks Crack 2025 latest new + license code
aneelaramzan63
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...Explaining GitHub Actions Failures with Large Language Models Challenges, In...
Explaining GitHub Actions Failures with Large Language Models Challenges, In...
ssuserb14185
 
How to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud PerformanceHow to Optimize Your AWS Environment for Improved Cloud Performance
How to Optimize Your AWS Environment for Improved Cloud Performance
ThousandEyes
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Douwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License codeDouwan Crack 2025 new verson+ License code
Douwan Crack 2025 new verson+ License code
aneelaramzan63
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Requirements in Engineering AI- Enabled Systems: Open Problems and Safe AI Sy...
Lionel Briand
 
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMeet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Meet the Agents: How AI Is Learning to Think, Plan, and Collaborate
Maxim Salnikov
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Download Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With LatestDownload Wondershare Filmora Crack [2025] With Latest
Download Wondershare Filmora Crack [2025] With Latest
tahirabibi60507
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New VersionPixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
Pixologic ZBrush Crack Plus Activation Key [Latest 2025] New Version
saimabibi60507
 
Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025Adobe Lightroom Classic Crack FREE Latest link 2025
Adobe Lightroom Classic Crack FREE Latest link 2025
kashifyounis067
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025Adobe After Effects Crack FREE FRESH version 2025
Adobe After Effects Crack FREE FRESH version 2025
kashifyounis067
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...
Eric D. Schabell
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Ad

Caching strategies with lucee

  • 1. Lucee Caching Strategies Gert Franz Rasia GmbH
  • 2. WHO AM I? • Gert Franz – Involved with Lucee and Railo since day 1 – Into CFML for 17 years – DBA, System architect – CFML Passionate • Rasia is founding Member of the Lucee Association
  • 3. MY EVOLUTION Assembler  Basic  Clipper  Pascal  Delphi  Java  CFML  Lucee
  • 4. WHO AM I? • Studied Astrophysics in Munich • Basic, dBase, Clipper, Visual Basic, Delphi, Java • Performance, DB & Code Tuning is my professional Hobby • I live in Switzerland • Lucee training, consulting, support etc.
  • 7. WHY? • Many server side operations are time consuming – Database, function calls, CFCs, CFHTTP, web services – "It works on my machine" effect – Tons of traffic make it necessary
  • 9. CACHING UPS AND DOWNS • Pro’s – Well yes, can’t really get faster than that – Mostly depends on the storage mechanism – Obviously RAM is the best location
  • 10. CACHING UPS AND DOWNS • Con’s – Well the only downside is the topicality / relevance of the data.
  • 11. OK GOT IT, CFML HOW, WHAT? • Your server is the clerk • It waits for requests • It checks places to retreive information • It takes time to do so
  • 12. SO HOW DOES THIS LOOK LIKE
  • 14. CACHES  DRIVERS • Cache in Lucee is an interface  what and where can I cache • Drivers are how you can store the data cached
  • 16. AVAILABLE CACHES • PagePool • Object • Template • Function • Include • HTTP • Query • Webservice • File • Other
  • 18. AVAILABLE DRIVERS • RAM • EHCache • EHCache Remote • Mongo DB • Redis • Couchbase * • Memcached • Database • Infinispan
  • 20. PAGEPOOL CACHE • Used whenever Lucee is supposed to execute a .cfm file • Choose between never, once and always • Data in cache can be listed (pagePoolList()) • Data can be cleared (pagePoolClear()) • Can not be used with a driver
  • 23. OBJECT CACHE • Cache used with cacheGet() cachePut() etc. • Is also used with the tag cfcache action get/put • Can be used with any driver
  • 25. TEMPLATE CACHE • Cache used with tag cfcache actions – Content – Cache – serverCache • Can be used with any driver
  • 27. FUNCTION CACHE • You can use the attribute cachedwithin for functions • Deterministic functions can be cached • Function will NOT be executed, • return value will be returned and content will be generated • Can be stored with any driver
  • 28. FUNCTION CACHE EXAMPLE struct function calcEnvironment(required string sUserAgent) cachedWithin="0.1" { some regexp stuff some db stuff return stEnv; }
  • 30. INCLUDE CACHE • I guess we were smoking pot when we designed this • Includes can be cached. Prevents execution and cached content will be rendered (functionality is IMHO incomplete) • Can be stored with any driver
  • 31. FUNCTION CACHE EXAMPLE include "myFile.cfm" cachedWithin="0.1";
  • 33. HTTP CACHE • The implementation is quite useful since CFHTTP calls are very time consuming • Just add the cachedwithin attribute to it • It will cache the CFHTTP.fileContent • Can be stored with any driver
  • 34. FUNCTION CACHE EXAMPLE http url="http://www.google.com" cachedWithin="0.1";
  • 36. WEBSERVICE CACHE • Is a new type of cache which allows you to cache web services • Just add cachedwithin to the cfinvoke call • Can be stored with any driver
  • 38. FILE CACHE • Is a new type of cache which allows you to cache file actions • Just add cachedwithin to the cffile call • In addition the file functions allow the argument as well • Can be stored with any driver
  • 42. QUERY CACHE • For sure the most used caching feature • Uses the sql, the params and the datasource as keys • Can be stored with any driver
  • 43. QUERY CACHE EXAMPLE qRet = queryExecute( sql:"SELECT TOP 10 name, zip FROM customers", options: { cachedWithin:0.1 datasource:"test", tags: ["Test1", "Test2"] } );
  • 44. QUERY CACHE EXAMPLE objectCache action="clear" tags="Test1";
  • 45. QUERY CACHE UNDER THE HOOD • Lucee stores the result of the query in the cache • It creates a hash of the SQL, the params and the other attributes • When the time is up, the cached element will be removed from cache
  • 46. QUERY CACHE UNDER THE HOOD • When the query is reexecuted Lucee will return a pointer to the cached query • It will always be a pointer to the query UNLESS…?
  • 48. CACHING UNDER LOAD • Caching often helps solving performance problems
  • 50. THE PROBLEM UNDER LOAD • Do you really know how the application is used • Without tons of logging • Without DB profiler turned on • Without Application monitoring • Without accumulation of data ?
  • 52. LEGACY APPLICATIONS • Old, not perfectly maintained • Take a lot of time to investigate (Missing knowledge) • Perhaps not worth rewriting • Old developer perhaps not available • Memory hog • Complex and large • Hard to tune  Expensive to tune
  • 54. HOW TO TUNE A LEGACY APPLICATION • Invest many resources • Build up knowledge • Have an expert look at the code • Rewrite the whole app • In short  it is expensive
  • 55. ARGUSCACHE The best way to speed up your apps
  • 56. • Designed for existing applications • Analyzes the application behavior • Analyzes the resources used • Runs in the background Here comes ARGUSCACHE
  • 57. • Allows you to see what's going on • Shows you whether you have potentioal for optimization • Shows you the potential performance gain ARGUSCACHE dashboard
  • 59. • Running in the cloud • Handling clusters • Handling many web contexts • Nice dashboard to manage everything Current development
  • 60. • 99.- US$ / month per context • CFCamp Promo for early signups and testers • Site licence available • Higher Discounts for support contract customers Pricing
  • 62. TALK TO ME / US • Come see me or Micha at the Lucee booth • Contact us [email protected], [email protected] • Challenge your application • Get highly dicounted license of ArgusCache

Editor's Notes

  • #7: Take a real life example. If you are to do all the same all the time, you go nuts. Just imagine you work in a store at the entrance and some customer comes to ask you how much a loaf of bread is. You walk into the store and have a look at the price sign of the bread. You write the price down on a sheet of paper and walk back to the customer which all in all takes you 2 minutes and tells him the price. And then you throw the piece of paper away!!!!!! And then, a bit later the next customer comes and guess what: He asks the same question. And you go, why me? My one job… But then you think, why should I throw the paper away when I am back?
  • #9: But what if the price of the loaf of bread is a dynamic thing which is dependent on the weight and the customer wants to have the exact price?
  • #11: My son and I were discussing the topic of cached data and I told him that caching is extremely important when you have tons of transactions going on. So he proposed that banks, who have millions of transactions should take advantage of caching. How I wish my current amount on the bank was cached.
  • #13: What about moving this to an external storage like Couchbase? Or MongoDB or any other cache Driver (let's look at this later)
  • #15: For example, you can cache queries in Lucee with the attribute «cachedwithin» and choose to store the data in MongoDB OUTSIDE of the server memory.
  • #19: * By Ortus
  • #21: Similar to the trusted cache
  • #24: Cfcache action content caches everything between the opening and closing tag by the attribute «key»
  • #26: Cfcache action content caches everything between the opening and closing tag by the attribute «key»
  • #28: Real life example with the user_agents
  • #31: Real life example with the user_agents
  • #41: Used for caching component calls and custom tag calls
  • #44: You can clear all the queries from cache which are tagged with the tag "Test1"; And how do you do that?
  • #45: You can clear all the queries from cache which are tagged with the tag "Test1";
  • #47: This is a difference between ACF and Lucee here
  • #49: Just save the result of expensive operations, for later reuse As seen above, some features do it automatically, some must be indicated, and others must be implemented manually Yet you can’t use it blindly, you have to understand the impact of caching Never using caching is likely also bad
  • #51: Any one or more of these would make a query a good candidate for caching Called very frequently Whether in a page, across many pages, or even many users Or returns data that takes long to gather Or returns data that does not change frequently Or has no or a small number of input arguments causing variation in SQL Given the limiter for cached queries CachedAfter better suited when data being cached is updated at a set time (like 2am)