Managing Vercel Data Cache
Learn how to enable, disable, and manage your usage for Vercel Data CacheThe Data Cache section in the Usage tab shows the following charts:
Metric | Description | Priced |
---|---|---|
Reads | The total amount of Read Units used to access the Data Cache | No |
Writes | The total amount of Write Units used to store new data in the Data Cache | No |
Bandwidth | The amount of data transferred from any unique path | No |
Revalidations | The total number of tags or items requested to revalidate | No |
Reads and writes to the data cache are measured in 8 KB units:
- Read unit: One read unit equals 8 KB of data read from the cache
- Write unit: One write unit equals 8 KB of data written to the cache
Vercel Data Cache storage has a fixed size limit based on your subscription. You cannot exceed your storage limit. When the storage limit is reached, existing items will be evicted based on which items were least recently used.
You are charged based on the volume of data read from and written to the Data Cache, and the regions where reads and writes occur. To optimize Data Cache reads and writes, consider the following strategies.
- For content that rarely changes, set a longer revalidation interval
- This minimizes the frequency of both Data Cache reads and writes
View a time-based revalidation example.
- If you have events that trigger data updates, use on-demand revalidation
- This will help you avoid unnecessary Data Cache reads and writes
View a on-demand revalidation example.
The Data Cache overview chart shows the usage from fetch requests divided by:
- Hits: Percentage of fetch requests to cache that result in a cache hit
- Misses: Percentage of fetch requests to cache that result in a cache miss
- Requests: Number of requests to any unique path
- Bandwidth: Amount of data transferred from any unique path
The total amount of Read Units used to access the Data Cache, measured in 8KB units.
You get charged based on the amount of data read from your Data Cache and the region(s) in which the reads happen.
When viewing your Data Cache read units chart, you can group by:
- Origin: To see the number of reads from either the Vercel Data Cache, or Incremental Static Regeneration (ISR)
- Projects: To see the number of read units for each project
- Region: To see the number of read units for each region
The total amount of Write Units used to store new data in the Data Cache, measured in 8KB units.
You get charged based on the amount of Data Cache write units written to your Data Cache and the region(s) in which the writes happen.
When viewing your Data Cache writes chart, you can group by sum of units to see a total of all writes across your team's projects.
- Origin: To see the number of writes to either the Vercel Data Cache, or Incremental Static Regeneration (ISR)
- Projects: To see the number of write units for each project
- Region: To see the number of write units for each region
Consider the following methods to optimize your Data Cache writes:
- Use a higher revalidate value: Selecting a higher
revalidate
value can reduce the number of writes because the data will be marked as stale less frequently, reducing the need for new writes - Use on-demand revalidation: Moving to on-demand revalidation can also help reduce the number of writes. This allows you to manually control when certain data is revalidated, reducing unnecessary writes
The bandwidth chart shows the amount of data the Vercel Data Cache has received and sent for your projects. You can group by:
- Ratio: To see the amount of data transferred and written by the Data Cache
- Projects: To see the amount of data transferred and written for each project, and a percentage of the total
Revalidations are the total number of tags or items requested to revalidate.
The revalidation chart shows the number of revalidation requests made to the Data Cache. You can group by:
- Ratio: To see the number of revalidation requests made to the Data Cache
- Projects: To see the number of revalidation requests for each project
- Item size – The maximum size of an item in the cache is 2 MB. Items larger than this will not be cached.
- Tags per item – A cache item can have a maximum of 64 tags.
- Maximum tag length – The maximum tag length is 256 bytes.
Was this helpful?