SlideShare a Scribd company logo
Caching
Concepts 1
Tomer Ben David
1.Sun Tzu view on cache
2.Where used
3.Limitations
4.HTTP headers
5.Recommendations
6.User
7.CDN
“The supreme art of war is to
subdue the enemy without
fighting.” –Sun Tzu
It’s Everywhere: Used in CPU,
HDD, DNS, Browsers, Proxies,
Reverse Proxies, Shared Cache
We should be able to rebuild all
cache if does not exist
Trading space for time, eviction
policy
How not to serve stale data?
Older http cache headers such as
"Pragma: no-cache" can be
interpreted differently by
different servers.
First header: "Cache-Control" got
in response private,max-age=15
(seconds) - this page is for this
user and not relevant after 15
seconds
Expires header, absolute time to
expire cache, overlap Cache-
Control: max-age
Recommendation, choose one
header type and be consistent
"Vary": Accept-Encoding => for
different Accept-Encoding I have
different caches
Use css as immutable if you have
a different version push it under a
different URL (for example with
the help of hash), this also allows
for versioning
Example per user cache:
Cache-Control: private, must-revalidate
Expires: Sat, 23 Jul 2015 13:14:28 GMT
Vary: Accept-Encoding
(must-revalidate) server asks impolitely the client not to
use the cache after expires
Avoid the http meta cache tags
instead of headers
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" /> <meta http-
equiv="expires" ...
Caching Players
Browser cache --> proxy cache --
> CDN cache --> reverse proxy
cache
SSL prevents proxies from
caching
Cache is not only for css cache
also your REST calls
You can point a subdomain to
CDN and CDN forwards to you
cachedcdn.mydomain.com
If fails/expires forwards requests
What/Who would you like to
hear about? please do
comment, and if liked please
like :)

More Related Content

PDF
Quick Introduction to Node.js
PDF
Frontend Track NodeJS
PDF
Page speed optimization
ODP
MySQL and SSD
PDF
Compressed js with NodeJS & GruntJS
PPT
Oreilly Webcast Jun17
PPT
Drush and drupal. администрирование волчек михаил
PPTX
Harder, Better, Faster, Stronger
Quick Introduction to Node.js
Frontend Track NodeJS
Page speed optimization
MySQL and SSD
Compressed js with NodeJS & GruntJS
Oreilly Webcast Jun17
Drush and drupal. администрирование волчек михаил
Harder, Better, Faster, Stronger

What's hot (9)

PPT
Drush&drupal. administration
PDF
Containers > VMs
PDF
2011 - DDU - Intro to Drush
PDF
Wordpress hosting canada
PDF
Container Security via Monitoring and Orchestration - Container Security Summit
PDF
Create a RESTful API with NodeJS, Express and MongoDB
PDF
Screaming Fast Wpmu
PPT
Performance Optimization using Caching | Swatantra Kumar
PDF
Redis Cache design
Drush&drupal. administration
Containers > VMs
2011 - DDU - Intro to Drush
Wordpress hosting canada
Container Security via Monitoring and Orchestration - Container Security Summit
Create a RESTful API with NodeJS, Express and MongoDB
Screaming Fast Wpmu
Performance Optimization using Caching | Swatantra Kumar
Redis Cache design
Ad

Similar to Caching concepts part 1 (20)

PPT
Real world capacity
PPT
VMWare Performance Tuning by Virtera (Jan 2009)
PPTX
Caching in Drupal 8
PDF
Comparison of foss distributed storage
PDF
Comparison of-foss-distributed-storage
PPTX
The Most Frequently Used Caching Headers
PDF
Cassandra from tarball to production
DOCX
What is the average rotational latency of this disk drive What seek.docx
PDF
Content Caching with NGINX and NGINX Plus
PPTX
Anthony Somerset - Site Speed = Success!
PDF
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
PPTX
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
PPTX
Cassandra in Operation
PDF
Browser Caching
PPTX
Using Time Window Compaction Strategy For Time Series Workloads
PDF
SUSE Storage: Sizing and Performance (Ceph)
PDF
Kafka on ZFS: Better Living Through Filesystems
PDF
Ceph Day Amsterdam 2015: Measuring and predicting performance of Ceph clusters
PDF
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
PPTX
Cinder
Real world capacity
VMWare Performance Tuning by Virtera (Jan 2009)
Caching in Drupal 8
Comparison of foss distributed storage
Comparison of-foss-distributed-storage
The Most Frequently Used Caching Headers
Cassandra from tarball to production
What is the average rotational latency of this disk drive What seek.docx
Content Caching with NGINX and NGINX Plus
Anthony Somerset - Site Speed = Success!
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Sizing MongoDB on AWS with Wired Tiger-Patrick and Vigyan-Final
Cassandra in Operation
Browser Caching
Using Time Window Compaction Strategy For Time Series Workloads
SUSE Storage: Sizing and Performance (Ceph)
Kafka on ZFS: Better Living Through Filesystems
Ceph Day Amsterdam 2015: Measuring and predicting performance of Ceph clusters
A Detailed Look At cassandra.yaml (Edward Capriolo, The Last Pickle) | Cassan...
Cinder
Ad

More from Tomer Ben David (7)

PPTX
Couchbase community vs enterprise
PPTX
Actors, akka, streams
PPTX
Scala 5 Concepts and Pitfals
PPTX
Apache Cassandra Concepts CheatSheet
PPTX
Best DevOps resources
PPTX
Scala diamond
Couchbase community vs enterprise
Actors, akka, streams
Scala 5 Concepts and Pitfals
Apache Cassandra Concepts CheatSheet
Best DevOps resources
Scala diamond

Recently uploaded (20)

PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
KodekX | Application Modernization Development
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
Teaching material agriculture food technology
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Cloud computing and distributed systems.
NewMind AI Monthly Chronicles - July 2025
Chapter 3 Spatial Domain Image Processing.pdf
KodekX | Application Modernization Development
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Empathic Computing: Creating Shared Understanding
Advanced methodologies resolving dimensionality complications for autism neur...
Understanding_Digital_Forensics_Presentation.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Reach Out and Touch Someone: Haptics and Empathic Computing
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Machine learning based COVID-19 study performance prediction
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Unlocking AI with Model Context Protocol (MCP)
Teaching material agriculture food technology
Spectral efficient network and resource selection model in 5G networks
Cloud computing and distributed systems.

Caching concepts part 1