# cache-control

Published articles for cache-control.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## nginx: The Map Variable That Fixes the URI in proxy\_pass

DevFeed: [nginx: The Map Variable That Fixes the URI in proxy\_pass](<https://devfeed.tech/articles/nginx-the-map-variable-that-fixes-the-uri-in-proxy-pass-34110.md>)

Original publisher: [Read original article](<https://philipptheserver.com/posts/nginx-map-uri-cache-policy/>)

Author: Philipp Lehmann (philipp.lehmann@gruppe.ai)

Published: 2026-09-14T07:00:00Z

Content type: tutorial

Language: en

Sources: [Philipp Lehmann](<https://devfeed.tech/sources/philipp-lehmann.md>)

Topics: [nginx](<https://devfeed.tech/topics/nginx.md>), [proxy](<https://devfeed.tech/topics/proxy.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [cache-control](<https://devfeed.tech/tags/cache-control.md>), [ci-cd](<https://devfeed.tech/tags/ci-cd.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [docker](<https://devfeed.tech/tags/docker.md>), [networking](<https://devfeed.tech/tags/networking.md>), [nginx](<https://devfeed.tech/tags/nginx.md>), [observability](<https://devfeed.tech/tags/observability.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [reverse-proxy](<https://devfeed.tech/tags/reverse-proxy.md>)

### AI overview

This article explains an nginx build failure caused by using a URI-bearing proxy_pass inside a regex location. A newer nginx version treated the previously accepted configuration as an error. The proposed fix uses a bare upstream in the regex location and a map on $uri to apply a path-specific Cache-Control policy.

### Source excerpt

nginx: [emerg] invalid URI prefix in proxy_pass: a regex location needs a bare upstream, and a map on $uri keeps a path-specific Cache-Control header.

## What is the BFF Pattern?

DevFeed: [What is the BFF Pattern?](<https://devfeed.tech/articles/what-is-the-bff-pattern-34694.md>)

Original publisher: [Read original article](<https://newsletter.systemdesigncodex.com/p/what-is-the-bff-pattern>)

Author: Saurabh Dashora

Published: 2026-04-07T08:41:56Z

Content type: tutorial

Language: en

Sources: [System Design Codex](<https://devfeed.tech/sources/system-design-codex.md>)

Topics: [BFF](<https://devfeed.tech/topics/bff.md>), [Amazon API Gateway](<https://devfeed.tech/topics/amazon-api-gateway.md>), [backends](<https://devfeed.tech/topics/backends.md>), [client](<https://devfeed.tech/topics/client.md>), [interface](<https://devfeed.tech/topics/interface.md>), [resiliency](<https://devfeed.tech/topics/resiliency.md>), [Orchestration](<https://devfeed.tech/topics/orchestration.md>), [rate-limiting](<https://devfeed.tech/topics/rate-limiting.md>)

Tags: [api-gateway](<https://devfeed.tech/tags/api-gateway.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [backends](<https://devfeed.tech/tags/backends.md>), [bff](<https://devfeed.tech/tags/bff.md>), [cache-control](<https://devfeed.tech/tags/cache-control.md>), [client](<https://devfeed.tech/tags/client.md>), [decoupling](<https://devfeed.tech/tags/decoupling.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [rate-limiting](<https://devfeed.tech/tags/rate-limiting.md>), [resiliency](<https://devfeed.tech/tags/resiliency.md>)

### AI overview

The article explains the Backends-for-Frontends (BFF) pattern, in which dedicated API gateways serve different client types such as web browsers, mobile apps, and public or partner APIs. It describes how BFFs tailor APIs, isolate client-specific logic, and support functions including rate limiting, authentication, header sanitization, and cache control. It also discusses benefits such as resiliency, client-specific optimization, and faster development, along with drawbacks including code duplication and increasing complexity.

### Source excerpt

And when do you need it?

## Scaling Nextdoor's Datastores: Part 4

DevFeed: [Scaling Nextdoor's Datastores: Part 4](<https://devfeed.tech/articles/scaling-nextdoor-s-datastores-part-4-20343.md>)

Original publisher: [Read original article](<https://engblog.nextdoor.com/scaling-nextdoors-datastores-part-4-c9d3d3edcd34?source=rss----5e54f11cdfdf---4>)

Author: Ronak Shah

Published: 2025-03-19T15:08:57Z

Content type: article

Language: en

Sources: [Nextdoor](<https://devfeed.tech/sources/nextdoor.md>)

Topics: [Cache](<https://devfeed.tech/topics/cache.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [distributed-systems](<https://devfeed.tech/topics/distributed-systems.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [cache](<https://devfeed.tech/tags/cache.md>), [cache-control](<https://devfeed.tech/tags/cache-control.md>), [cache-invalidation](<https://devfeed.tech/tags/cache-invalidation.md>), [caching](<https://devfeed.tech/tags/caching.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [concurrent](<https://devfeed.tech/tags/concurrent.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [database-consistency](<https://devfeed.tech/tags/database-consistency.md>), [distributed-systems](<https://devfeed.tech/tags/distributed-systems.md>), [examples](<https://devfeed.tech/tags/examples.md>), [infrastructure](<https://devfeed.tech/tags/infrastructure.md>), [lua](<https://devfeed.tech/tags/lua.md>)

### AI overview

Part 4 of Nextdoor's datastore series explains how racing database writes can update a cache in a different order, allowing stale writes and leaving the cache inconsistent with the database. It introduces the problem and notes that the full solution will be covered in a later installment.

### Source excerpt

In this part of the Scaling Nextdoor's Datastores blog series, we will see how the Core-Services team at Nextdoor keeps its cache consistent with database updates and avoids stale writes to the cache. In this post, we'll focus specifically on inconsistencies caused by racing writes and our solution. We'll discuss other causes and our full solution for consistent caching in the next installment of our blog: Part 5: A time-bounded eventually-consistent cache. Inconsistent Cache Caches can become inconsistent with the database for several reasons, such as: Racing Writes / Concurrent Updates: Multiple writes occurring simultaneously can result in a stale cache. Missed Writes / Failing to Update the Cache: Failure to update or set cache correctly after a database write. Delayed Cache Updates or Deletes: Slow propagation of updates or invalidation can leave the cache out of sync. Application-Level Bugs: Bugs in application side caching logic. Maintaining cache consistency with the database is crucial for data accuracy, especially in distributed systems with concurrent web requests. Consistent caching ensures reliable read-after-write behavior, improving performance and user experience. Without it, applications may face unpredictable behavior and user frustration. A well-designed caching system boosts performance, ensures consistency, and delivers up-to-date data even under high concurrency. Racing Writes Let's look at the scenario where two writers, A and B, update the same user in the database but write to the cache in a different order, causing the cache to become inconsistent with the database. Author's Note: In examples moving forward we'll use "User_1" to mean id=1 in the "users" table.Look-Aside Cache with two writers. Sequence of operations: Writer A updates the name of user_1 to Foo in the database. Writer B updates the name of the same user_1 to Bar in the database. Writer B updates the cache for user_1 with name = Bar. Writer A updates the cache for user_1 with

## New HTTP standards for caching on the modern web

DevFeed: [New HTTP standards for caching on the modern web](<https://devfeed.tech/articles/new-http-standards-for-caching-on-the-modern-web-19097.md>)

Original publisher: [Read original article](<https://httptoolkit.com/blog/status-targeted-caching-headers/>)

Author: HTTP Toolkit; Tim Perry

Published: 2021-10-20T14:00:00Z

Content type: article

Language: en

Sources: [HTTP Toolkit](<https://devfeed.tech/sources/http-toolkit.md>)

Topics: [HTTP](<https://devfeed.tech/topics/http.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [Internet Engineering Task Force (IETF)](<https://devfeed.tech/topics/ietf.md>), [Web](<https://devfeed.tech/topics/web.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [servers](<https://devfeed.tech/topics/servers.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cache-control](<https://devfeed.tech/tags/cache-control.md>), [caching](<https://devfeed.tech/tags/caching.md>), [cdn](<https://devfeed.tech/tags/cdn.md>), [http](<https://devfeed.tech/tags/http.md>), [ietf](<https://devfeed.tech/tags/ietf.md>), [latency](<https://devfeed.tech/tags/latency.md>), [performance](<https://devfeed.tech/tags/performance.md>), [server](<https://devfeed.tech/tags/server.md>), [standards](<https://devfeed.tech/tags/standards.md>), [web](<https://devfeed.tech/tags/web.md>)

### AI overview

This article explains two emerging IETF HTTP standards for CDN and cache management: the Cache-Status header and Targeted Cache-Control Headers. It describes how they are intended to improve cache debugging and configuration, while noting that both specifications are still new and widespread support is not yet expected.

### Source excerpt

If you run any large public-facing website or web application on the modern web, caching your static content in a CDN or other caching service is super important. It's also remarkably complicated and confusing. Fortunately, the HTTP working group at the Internet Engineering Task Force (IETF) is working to define new HTTP standards to make this better. There's been a lot of work here recently to launch two new HTTP header draft standards intended to make debugging your caching easier, and to provide more control over your cache configuration. Let's see what that means, how these work, and why everyone developing on the web should care. The Standards The two proposed standards I'm talking about are: The Cache-Status Header Targeted Cache-Control Headers These are designed to update HTTP standards to match the reality of the CDN-powered web that exists today, creating specifications that formalize existing practices from popular CDNs (like Fastly, Akamai & Cloudflare, all of whom have been involved in the writing the standards themselves). Both of these are fairly new specifications: Cache-Status has completed multiple rounds of review in 2021 and is currently awaiting (since August) final review & publication as a formal RFC, while Targeted Cache-Control Headers is currently an adopted draft standard, but in its last call for feedback. In both cases, they're backed by the IETF, they're received a lot of discussion already and it's unlikely they'll change much beyond this point, but they're also still new, so support isn't likely to be widespread yet. Why does caching matter? If you're running a high-profile user-facing web application, caches and CDNs are absolutely critical to providing good performance for end users at a reasonable cost. Caches and CDNs sit in front of your web server, acting as a reverse proxy to ensure that: Content is cached, so your backend server only receives occasional requests for static content, not one request direct from every visitor. Co

## The current state of Brotli compression

DevFeed: [The current state of Brotli compression](<https://devfeed.tech/articles/the-current-state-of-brotli-compression-41341.md>)

Original publisher: [Read original article](<https://samsaffron.com/archive/2016/06/15/the-current-state-of-brotli-compression>)

Author: Sam Saffron

Published: 2016-06-15T00:10:11Z

Content type: article

Language: en

Sources: [Sam Saffron](<https://devfeed.tech/sources/sam-saffron.md>)

Topics: [Compression](<https://devfeed.tech/topics/compression.md>), [browsers](<https://devfeed.tech/topics/browsers.md>), [Chrome](<https://devfeed.tech/topics/chrome.md>), [Firefox](<https://devfeed.tech/topics/firefox.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Caching](<https://devfeed.tech/topics/caching.md>)

Tags: [browsers](<https://devfeed.tech/tags/browsers.md>), [cache-control](<https://devfeed.tech/tags/cache-control.md>), [caching](<https://devfeed.tech/tags/caching.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [compression](<https://devfeed.tech/tags/compression.md>), [firefox](<https://devfeed.tech/tags/firefox.md>), [http](<https://devfeed.tech/tags/http.md>)

### AI overview

The article examines Brotli compression adoption in Chrome and Firefox, its restriction to HTTPS, compatibility problems with non-compliant HTTP intermediaries, and measured compression savings compared with competing approaches.

### Source excerpt

In late May 2016 Chrome pushed out Chrome 51, unlike many releases of Chrome which are complete non-events, this release has an enormous impact. Google turned on Brotli support - and they promptly backported it into Chrome 50. Pasted image1022x761 41.9 KB Firefox added support for Brotli in September 2015. They even blogged about it. 8 months later, thanks to Google, Brotli went from a compression format supported in less than 10% of global browsers to nearly 50% global adoption! Brotli is HTTPS only If you visit a site over HTTP your browser will not accept the br encoding. The reasoning for this is documented at the end of the chromium issue. pdansk I have a question. What does intermediates refer to in the reason to restrict this feature to HTTPS only? Caches? If so, this may or may not be solved by adding no-transform to Cache-Control when you send Content-Encoding: br. I don't know. I think that restricting to HTTPS is regrettable, as what you save with brotli you lose double by not having caching. kenjibaheux@chromium Intermediaries (or "middle boxes") refers to companies/infra/software meddling with the data transfer between you (the user) and the webserver. One example from SDCH that was mentioned to me (the name of the company is not relevant to the discussion so I'm hiding it): "The most extreme case of middle box was Company AcmeTelecom (fictitious name but true story), that tried to make things better when faced with unknown content encodings, by doing the following things: a) Remove the unrecognized content encoding b) Pass the (already compressed!) content through another gzip encoding pass c) Claim that the content was merely encoded as gzip" Lack of Brotli support over unencrypted HTTP is no mistake. The world is full of terribly non-compliant HTTP proxies: https://twitter.com/samsaffron/status/514538810894340097 Brotli is yet another reason for you to push for that HTTP/2 change you have been holding out on. Brotli: The New Pied Piper? When I first

## Apache - Force caching dynamic PHP content with mod\_headers

DevFeed: [Apache - Force caching dynamic PHP content with mod\_headers](<https://devfeed.tech/articles/apache-force-caching-dynamic-php-content-with-mod-headers-27626.md>)

Original publisher: [Read original article](<https://gagor.pro/2015/12/apache-force-caching-dynamic-php-content-with-mod_headers/>)

Author: Tom

Published: 2015-12-29T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [PHP](<https://devfeed.tech/topics/php.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [servers](<https://devfeed.tech/topics/servers.md>), [Website](<https://devfeed.tech/topics/website.md>)

Tags: [apache](<https://devfeed.tech/tags/apache.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cache-control](<https://devfeed.tech/tags/cache-control.md>), [caching](<https://devfeed.tech/tags/caching.md>), [http](<https://devfeed.tech/tags/http.md>), [linux](<https://devfeed.tech/tags/linux.md>), [php](<https://devfeed.tech/tags/php.md>), [speed](<https://devfeed.tech/tags/speed.md>), [website](<https://devfeed.tech/tags/website.md>)

### AI overview

A short Apache configuration guide for caching dynamic PHP content with mod_headers, including public Cache-Control settings and removal of Pragma and Expires headers.

### Source excerpt

Normally you want dynamic content to be fresh and not cacheable. But sometimes it may be useful to cache it, like when you have website behind reverse proxy1. To do this try something like this: Add new Apache conf file <filesmatch "\.(php|cgi|pl)$"> Header unset Pragma Header unset Expires Header set Cache-Control "max-age=3600, public" </filesmatch> http://www.askapache.com/htaccess/speed-up-your-site-with-caching-and-cache-control.html external link ↩︎

## Apache mod\_expires konfiguracja

DevFeed: [Apache mod\_expires konfiguracja](<https://devfeed.tech/articles/apache-mod-expires-konfiguracja-27510.md>)

Original publisher: [Read original article](<https://gagor.pro/2012/01/apache-mod_expires-konfiguracja/>)

Author: Tom

Published: 2012-01-23T00:00:00Z

Content type: tutorial

Language: pl

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [Cache](<https://devfeed.tech/topics/cache.md>)

Tags: [apache](<https://devfeed.tech/tags/apache.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cache-control](<https://devfeed.tech/tags/cache-control.md>), [debian](<https://devfeed.tech/tags/debian.md>), [mod-rewrite](<https://devfeed.tech/tags/mod-rewrite.md>), [rewrite](<https://devfeed.tech/tags/rewrite.md>)

### AI overview

A Polish tutorial on configuring Apache mod_expires to set Cache-Control and Expires headers for static files, with guidance on cache durations and cache-busting paths. It also discusses disabling ETag generation to reduce disk-stat operations under load.

### Source excerpt

Aby umożliwić odwiedzającym nasze strony cachowanie obrazków (tak by nie musieli pobierać ich każdorazowo bo przecież nie zmieniają się aż tak często) konieczne jest ustawienie nagłówków: Cache-Control, Expires dla odpowiednich typów plików. W Apachem jest do tego dedykowany moduł - mod_expires. W Debianie dostarczany jest on bez domyślnej globalnej konfiguracji - a ja lubię gdy cacheuje mi się większość statyki. Zawsze można dostosować czas cachowania pod siebie względem określonego typu pliku, np. dla Java Scriptów ustawić na 1 dzień gdy często się zmieniają. Można też w samej aplikacji zmieniać ścieżkę do pliku by wymusić odświeżenie (lub podawać ścieżkę z jakimś losowym identyfikatorem wycinanym przez mod_rewrite).