IRYS 101
Optimistic cache

Optimistic cache

The optimistic cache ensures all data uploaded to Irys is immediately available via gateways, which are responsible for making data available to users.

When a user requests data from a gateway, it searches for it in its local cache. If the data is not found, the gateway requests it from Arweave. If the data is still not found, the gateway requests it from Irys' optimistic cache. The optimistic cache is essential for providing users with real-time access to uploaded data, as it provides access to transactions that have not yet been seeded on Arweave, but are expected to be seeded soon.

The optimistic cache queries each Irys node sequentially until the data is found. Node 1 and 2 are queried first, followed by Devnet. If the data is found, it is returned instantly. Otherwise, a 404 code is returned.

On Irys' Devnet, uploads are kept for approximately 60 days, during this time, the data is available from gateways in the same way that normal uploads are.