# Topic cache

What makes Diffusion's Pub/Sub unique compared other platforms is our last value cache. By default, topics in Diffusion will store the most recent value in memory. When a client first subscribes to a topic, it is sent the current value of the topic, meaning that new connections don't need to wait for the next update before receiving useful data.

# Automatic deltas

One of the key benefits of retaining the latest value for topic is that it lets Diffusion radically optimise the amount of data it needs to deliver. Whenever Diffusion receives an update for a topic, it compares the new value against the previous one, and only sends the differences in data to each subscriber. The Diffusion Client SDKs will automatically reconstruct the full value from these deltas - meaning that your application sends and receives whole messages, but the bandwidth needed to deliver your data can be reduced by as much as 99%.

# Application state

Topic state is retained indefinitely, is fully replicated, and is persisted to disk. This ensures availability of data and enables you to treat Diffusion like a real-time data cache, where your application can send stateless events and store persistent application state all through the same platform.

If your application does not require retaining state for a topic, you can use the DONT_RETAIN_VALUE topic property to disable the last-value cache entirely.