---
title: "Modal's serverless KV store gets its limit raised to infinity"
description: "Modal's Dict key-value primitive now has unlimited storage, durability, a 7-day TTL that is refreshed on both reads and writes (previously 30 days since last write with a 10GiB cap), and a `skip_if_exists` flag on `.put()` that works as a distributed lock."
url: "https://swe.quest/articles/modal-s-serverless-kv-store-gets-its-limit-raised-to-infinity-9f67f240cb6a408f"
canonical: "https://modal.com/blog/cache-dict-launch"
source: "Modal"
published: "2025-05-20"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 4
tags: ["serverless","caching","distributed-systems","python"]
---

# Modal's serverless KV store gets its limit raised to infinity

A post on [Modal](https://swe.quest/sources/modal.md), published 2025-05-20, 4 min read, Announcement. Original: [https://modal.com/blog/cache-dict-launch](https://modal.com/blog/cache-dict-launch)

## Summary

Modal's Dict key-value primitive now has unlimited storage, durability, a 7-day TTL that is refreshed on both reads and writes (previously 30 days since last write with a 10GiB cap), and a \`skip\_if\_exists\` flag on \`.put()\` that works as a distributed lock. Together these give LRU-like caching and exactly-once coordination across containers. A worked example builds a request cacher that dedupes bursts of identical requests. It writes a pending entry with \`skip\_if\_exists\`, stores the spawned function-call handle as in\_progress, then stores the completed result, so the expensive backend function runs only once.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Distributed systems](https://swe.quest/tags/distributed-systems.md) (Distributed systems)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- key-value stores
- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- distributed locking basics

## Keywords

Modal, Modal Dict, FastAPI

## Related posts

- [Serverless routing made sticky](https://swe.quest/articles/serverless-routing-made-sticky-bebd537ed004d584.md): Modal · 2026-10-20 · Medium · 5 min read · Serverless, Load balancing, System design, Real-time systems, Capacity planning
  Modal's Sticky Sessions pin every request in a session to the same serverless container, which suits stateful workloads like streaming speech-to-text, voice agents, shared rooms and multiplayer games without resorting to max\_containers=1.
- [Memory snapshots: Checkpoint/restore for sub-second startup](https://swe.quest/articles/memory-snapshots-checkpoint-restore-for-sub-second-startup-543b0ee4c645204a.md): Modal · 2025-01-28 · Medium · 9 min read · Serverless, Containers, Sandboxing & isolation, Performance engineering, Linux
  Modal cuts serverless container cold starts roughly 2.5x by checkpointing a gVisor container's full process tree and filesystem mutations just before it accepts a request, then restoring it instead of re-running Python's syscall-heavy import path (import torch alone makes 26,000 syscalls through OverlayFS and a FUSE lazy-loading server).
- [Introducing Web Cache API support on Deno Deploy](https://swe.quest/articles/introducing-web-cache-api-support-on-deno-deploy-30aea198ea4df954.md): Deno · 2024-08-27 · Medium · 4 min read · Caching, Serverless, JavaScript, CDN & edge
  Deno Deploy now offers beta support for the web-standard Cache API, giving serverless code semi-persistent storage for Request/Response pairs via caches.open(), cache.match() and cache.put().
- [Use Turso as your Unkey cache store](https://swe.quest/articles/use-turso-as-your-unkey-cache-store-177ce1ca33005f50.md): Turso · 2024-08-01 · Medium · 2 min read · Caching, SQLite, TypeScript
  Turso can serve as the backing store for Unkey's \`@unkey/cache\` middleware library through its \`LibSQLStore\` adapter.
- [Bringing serverless functions closer to the speed of wire](https://swe.quest/articles/bringing-serverless-functions-closer-to-the-speed-of-wire-4593ae513494961f.md): Modal · 2026-08-04 · Medium · 5 min read · Serverless, Performance engineering, System design, Go, Queues & messaging
  Modal rebuilt its serverless I/O plane, which queues Function inputs and outputs, and now runs it in at least four regions.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
