Redis and Caching

2 min read Updated 1 week ago

Caching Services

Ploi Cloud supports both Redis and Valkey for in-memory caching and session storage.

Redis vs Valkey

  • Redis: In-memory data structure store

  • Valkey: High-performance key-value store with full Redis compatibility

Adding a Cache Service

  1. Navigate to your application's overview

  2. Find the "Cache" card

  3. Click "Create" to add your first cache service (or "Add cache" if you already have services)

  4. Select Redis or Valkey as the cache type

  5. Configure resources using the CPU slider (memory is automatically allocated at 4GB per core)

  6. Set storage size for data persistence (cannot be changed after creation)

  7. Optionally select a specific version or leave blank for latest

Laravel Configuration

For Laravel applications, the following environment variables are automatically injected:

  # For Redis  REDIS_URL=redis:

Update your Laravel cache configuration to use these variables:

  CACHE_DRIVER=redis
  SESSION_DRIVER=redis

Resource Configuration

When creating a cache service, you can configure:

  • CPU: Adjustable via slider (from 0.25 to multiple cores)

  • Memory: Automatically allocated at 4GB per CPU core

  • Storage: Persistent volume for data (e.g., "8Gi", "10Gi")

Service Management

Manage your cache service through the application dashboard:

  • View service logs for troubleshooting

  • Restart the service when needed

  • Enable temporary debug access for direct connections

  • Monitor service status (active, stopped, failed)

  • Edit resources to scale up or down