Get the latest tech news

Cache


The Cache interface provides a persistent storage mechanism for Request / Response object pairs that are cached in long lived memory. How long a Cache object lives is browser dependent, but a single origin's scripts can typically rely on the presence of a previously populated Cache object. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec.

You are responsible for implementing how your script (e.g., in a ServiceWorker) handles Cache updates. Items in a Cache do not get updated unless explicitly requested; they don't expire unless deleted. The browser does its best to manage disk space, but it may delete the Cache storage for an origin.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of cache

cache

Related news:

News photo

How to clear the cache on your Windows 11 PC (and why it greatly improves performance)

News photo

Implement Flash Attention Back End in SGLang – Basics and KV Cache

News photo

Cache loop and memory loss in GPT – a user-side fix (tested with GPT itself)