Skip to main content
Powered by Upstash
Redis by Upstash is deprecated. New Redis by Upstash caches can no longer be created. Existing caches will continue to be supported but are scheduled to be sunset. We recommend migrating to a Laravel Valkey cache, which offers Redis API compatibility, better performance, and more precise per-second billing.If you need a larger cache, Laravel Cloud also offers managed AWS ElastiCache caches to Enterprise customers. To learn more, contact sales.

Introduction

Laravel Cloud offers an alternative KV store through a partnership with Upstash. Redis by Upstash caches offer the following functionalities:
  • Multiple cache sizes, from 250MB to 500GB.
  • Auto-upgrades.
  • Metrics and monitoring.
KV stores serve multiple purposes within your Laravel application. They can function as your application’s cache, a backend for storing queued jobs, or for managing sessions. Additionally, you have the option to interact directly with the key-value store by utilizing the Redis API.

Connecting to Redis by Upstash

From your application

When a cache is attached to an environment, Laravel Cloud will automatically inject the environment variables needed by the Laravel application to interact with the cache via the Cache facade, including the CACHE_STORE, REDIS_HOST, and REDIS_PASSWORD variables. You may view these environment variables in your environment’s General Settings.

From your local machine

To connect to your Redis by Upstash cache from your local machine, click the ”…” icon next to the cache card in your environment’s canvas dashboard, then click “View credentials”. The cache credentials modal window will provide you with the credentials needed to connect to your cache.

Editing and resizing your cache

You may edit and resize a Redis by Upstash cache via your organization’s “Resources” page. From the “Resources” page, navigate to the “Caches” tab and click the ”…” icon for the cache you would like to edit or resize. Then, click “Edit settings”.

Detaching and deleting your cache

If a KV store is no longer needed in your project, you can detach it from your application canvas.
Detaching a KV store does not delete the store. As KV stores can be shared across many applications, you cannot directly delete a KV store from your application, only detach it.KV stores are billed for their availability, regardless of whether they are in use by an application. To permanently delete a KV store, you should visit your organization’s “Resources” page.
You may delete a Redis by Upstash cache via your organization’s “Resources” page. From the “Resources” page, navigate to the “Caches” tab and click the ”…” icon for the cache you would like to delete. Then, click “Delete cache”.

Monitoring cache metrics

You may view metrics such as storage usage, throughput, and hit / miss ratio for Redis by Upstash via your organization’s “Resources” page. From the “Resources” page, navigate to the “Caches” tab and click the ”…” icon for an available cache. Then, click “View metrics”.