Documentation Index
Fetch the complete documentation index at: https://cloud.laravel.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
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.
Creating a Redis by Upstash cache
To create a Redis by Upstash cache, head over to your environment’s canvas and click “Cache”, then select “Create new cache”. Under “Cache type”, select “Redis by Upstash”.
Once the cache has been attached to an environment, you will need to redeploy the environment in order for the changes to take effect.
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”.