Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Nginx Troubleshooting

You're reading from   Nginx Troubleshooting Investigate and solve problems with Nginx-powered websites using a deep understanding of the underlying principles

Arrow left icon
Product type Paperback
Published in Apr 2016
Publisher
ISBN-13 9781785288654
Length 172 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alexey Kapranov Alexey Kapranov
Author Profile Icon Alexey Kapranov
Alexey Kapranov
Arrow right icon
View More author details
Toc

Solving problems with cache

We spent a lot of time on providing good caching, that is, saving intermediate results and serving saved copies instead of recalculating from scratch for the same requests. This works perfectly only in a perfect world (for example, a pure functional world where functions and, by extension, GET/HEAD HTTP requests do not have side effects). In the real world, two equal requests may sometimes lead to different responses. There are two basic reasons for it: the earlier-mentioned side effects, which change the state despite the perceived idempotence of GET/HEAD, or flawed equality relationship between requests. A good example of this is ignoring wall time when the response depends on it.

Such problems usually manifest themselves as complaints about seeing stale versions of some pages on your website or seeing pages that belong to other users. Although you can tolerate the first type to some extent (for example, as a compromise for performance), the second type is a...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime