<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/stale-allow-caches-beat-slow-re-checks-174xqazf7" -->

---
title: Stale allow caches beat slow re-checks | daily.dev
description: Caching authorization decisions can be risky if allow decisions persist too long, especially when roles or permissions change. The recommendation is to use...
canonical: https://daily.dev/posts/stale-allow-caches-beat-slow-re-checks-174xqazf7
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Stale allow caches beat slow re-checks | daily.dev
og:description: Caching authorization decisions can be risky if allow decisions persist too long, especially when roles or permissions change. The recommendation is to use...
og:url: https://daily.dev/posts/stale-allow-caches-beat-slow-re-checks-174xqazf7
og:image: https://api.daily.dev/og/posts/174xqazF7.png
og:image:alt: Stale allow caches beat slow re-checks
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Stale allow caches beat slow re-checks

**[Auth By Example](https://daily.dev/sources/7eadcwhmohx0bchehapmt)** · [@authbyexample](https://daily.dev/authbyexample) · 1 min read · 0 upvotes · 0 comments

## Summary

Caching authorization decisions can be risky if allow decisions persist too long, especially when roles or permissions change. The recommendation is to use short TTLs for positive (allow) decisions and to invalidate or re-check caches whenever membership, roles, or resource ownership changes. A slower deny is preferable to a stale allow that could leak access.

## Content

Caching an authorization decision is fine for a few seconds. Caching an allow for minutes while someone’s role was revoked is how you leak access.

Prefer short TTLs on positive decisions, and invalidate (or re-check) when membership, roles, or resource ownership changes. A slightly slower deny is safer than a stale allow.

## Similar posts on daily.dev

- [Short-Lived Credentials in Agentic Systems: A Practical Trade-off Guide](https://daily.dev/posts/short-lived-credentials-in-agentic-systems-a-practical-trade-off-guide-h0cal49yt) · GitGuardian · 1 upvotes · 0 comments
- [Cache: Stop Asking the Database the Same Question](https://daily.dev/posts/cache-stop-asking-the-database-the-same-question-qjeabvnp4) · Medium · 1 upvotes · 1 comments
- [A Stolen Token Is Useless. A Stale One Still Works.](https://daily.dev/posts/a-stolen-token-is-useless-a-stale-one-still-works--1mcdf6whq) · API Evangelist · 1 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#authorization](https://daily.dev/tags/authorization)

[View this post on daily.dev](https://daily.dev/posts/stale-allow-caches-beat-slow-re-checks-174xqazf7)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"DiscussionForumPosting","mainEntityOfPage":"https://daily.dev/posts/stale-allow-caches-beat-slow-re-checks-174xqazf7","headline":"Stale allow caches beat slow re-checks","text":"Caching authorization decisions can be risky if allow decisions persist too long, especially when roles or permissions change. The recommendation is to use short TTLs for positive (allow) decisions and to invalidate or re-check caches whenever membership, roles, or resource ownership changes. A slower deny is preferable to a stale allow that could leak access.","url":"https://daily.dev/posts/stale-allow-caches-beat-slow-re-checks-174xqazf7","datePublished":"2026-09-19T18:54:15.649Z","dateModified":"2026-09-19T18:54:30.602Z","author":{"@type":"Person","name":"Auth By Example","url":"https://daily.dev/authbyexample","image":"https://media.daily.dev/image/upload/s--Fgz7IgGQ--/f_auto/v1789653205/avatars/avatar_7EADCwHmOHX0bChEhAPmt?_a=BAMAMicg0","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"EndorseAction"},"userInteractionCount":60}},"interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"isPartOf":{"@type":"WebPage","url":"https://daily.dev/sources/7eadcwhmohx0bchehapmt","name":"Auth By Example"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Auth By Example","item":"https://daily.dev/sources/7eadcwhmohx0bchehapmt"},{"@type":"ListItem","position":3,"name":"Stale allow caches beat slow re-checks"}]}
```

