Expiry
Expiry is the point in time or elapsed duration after which an item or resource is no longer considered valid, current, or available.
API Design Patterns
An expiration time is the point in time after which a resource is intended to be deleted or otherwise no longer retained.
- How it is used
- Controls how long operations, soft-deleted resources, page tokens, and cached responses remain available.
- How deep it goes
- Defines field behavior, policy choices, cleanup conditions, and timing recommendations, but stops short of implementation algorithms.
- Examples
- Uses 30-day Operation and soft-deletion windows, short-lived page tokens, and a five-minute sliding request-cache window.
- What you can do after
- Operate/configure it by assigning explicit expiration fields and choosing consistent, documented retention policies.
Learn Go with Pocket-Sized Projects
A time to live is a duration after which stored data is considered expired and should no longer be used.
- How it is used
- Prevents a cache from returning values that have become outdated.
- How deep it goes
- Defines TTL and traces its configuration and effects on insertion, update, read, and deletion.
- Examples
- Uses cache values with differing freshness needs and tests expiration with a short TTL and sleep.
- What you can do after
- Build a generic cache that expires entries and reports them as missing when read.
Read how Learn Go with Pocket-Sized Projects explains expiry →
Build Python Web Apps with Streamlit
A time-to-live is a configured duration for which cached data remains valid before it must be recomputed.
- How it is used
- Keeps cached data aligned with changing source files by triggering recomputation after a configured duration.
- How deep it goes
- Defines TTL through a daily CSV example and shows `st.cache_data(ttl="1d")`, without detailing expiry internals.
- Examples
- Uses a sales CSV refreshed daily and a one-day cache duration for dashboard data.
- What you can do after
- Configure `st.cache_data` with a TTL so changing source data is reloaded after the chosen interval.
Read how Build Python Web Apps with Streamlit explains expiry →
Authorization in Action
An expiration date is the recorded date after which a document or credential is no longer considered valid for its intended purpose.
- How it is used
- Limits how long credentials or cached authorization signals are treated as current.
- How deep it goes
- Defines fixed validity windows and contrasts them with revocation checks and signal-specific cache freshness.
- Examples
- Uses a one-year employment credential, a CISA-R renewal cycle, and five-minute versus 24-hour signal caches.
- What you can do after
- Apply expiration and revocation checks before using credential claims in authorization decisions.
Latency
Time-to-live is a caching mechanism that limits how long an entry remains valid before it is treated as expired and removed or refreshed.
- How it is used
- Controls cache freshness by bounding how long entries remain valid before retrieval from backing storage.
- How deep it goes
- Defines time-based expiration, entry checks, refresh behavior, DNS examples, and freshness-versus-hit-ratio trade-offs.
- Examples
- Uses stable and dynamic DNS records, plus database updates that bypass the cache, to illustrate TTL choices.
- What you can do after
- Configure cache freshness by choosing a TTL and retrieving updated data after expiration.
Also covered in
- ScyllaDB in Action
- Amazon Web Services in Action, Third Edition: An in-depth guide to AWS
- Investing for Programmers
- Infrastructure as Code, Patterns and Practices: With examples in Python and Terraform
- Tech Startup Toolkit
- Generative AI in Action
- Acing the CCNA Exam: Volume 2 Advanced Networking and Security
- Machine Learning Platform Engineering
- Rust Web Development
- Spring Security in Action, Second Edition
- Fast by DefaultIn early access (MEAP)
- MongoDB 8.0 in Action, Third Edition
What to know first
- cachingCaching is the temporary storage of data or computed results for reuse, reducing the work or delay of retrieving or computing them again.
- stale dataStale data is information that no longer reflects the latest state of its source or relevant conditions.
- JSON Web TokenA JSON Web Token is a compact, URL-safe format for representing claims as a JSON object that can be digitally signed, integrity-protected, or encrypted.
- meanThe mean is a measure of central location equal to the arithmetic average of numerical observations, or the probability-weighted average of a random variable’s possible values.
Related concepts
- cachingconfigures · Caching is the temporary storage of data or computed results for reuse, reducing the work or delay of retrieving or computing them again.
- cache invalidationaddresses · Cache invalidation is the process of making cached data unusable when it is no longer valid, typically by removing it or marking it stale.
- domain name systemused by · The Domain Name System (DNS) is a distributed, hierarchical naming system that resolves domain names to IP addresses and other network resource records.
- historical dataconfigures · Historical data is recorded information about past events, observations, states, or outcomes retained for later access or analysis.
Questions about expiry
What is expiry?
Expiry is the point in time or elapsed duration after which an item or resource is no longer considered valid, current, or available.
Which Manning books explain expiry?
API Design Patterns, Learn Go with Pocket-Sized Projects, Build Python Web Apps with Streamlit, Authorization in Action and Latency.
What should I know before learning expiry?
Manning books that teach expiry usually introduce caching, stale data, JSON Web Token and mean first.
What is expiry also called?
Expiry is also called expiration date.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




