Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Working with Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Model Context Protocol
    • Vector Database
    • Heroku Inference
      • Inference API
      • Quick Start Guides
      • AI Models
      • Inference Essentials
    • Working with AI
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
  • Add-ons
  • All Add-ons
  • Cache To Go
Cache To Go

This add-on is operated by Sidebored.io,Inc.

Boost Heroku with Cache To Go: Easy Redis caching & support.

Cache To Go

Last updated February 01, 2024

The Cache To Go add-on is currently in beta.

Table of Contents

  • Features
  • Provisioning the Add-On
  • Local Setup
  • Configuring Your Application
  • Migrating Between Plans
  • Removing the Add-On
  • Support
  • Additional Resources

Cache To Go is a powerful Redis service designed for Heroku applications. It offers fast, reliable, and easy-to-integrate caching and storage solutions to improve the performance and scalability of your applications.

Features

  • High Performance: Leveraging Redis, Cache To Go delivers high-speed data access.
  • Easy Integration: Seamlessly integrates with Heroku apps.
  • Scalability: Scales with your application’s needs.
  • Data Security: Ensures data is secure and private.
  • Monitoring and Metrics: Comprehensive insights into usage and performance.

Provisioning the Add-On

Add Cache To Go to your application via the CLI:

Reference the Cache To Go Elements Page for a list of available plans and regions.

heroku addons:create cachetogo --app example-app

Local Setup

Environment Setup

After provisioning the add-on, replicate its config vars locally for development environments that need the service.

Use the local Heroku CLI command to configure, run, and manage process types specified in your app’s Procfile. Heroku Local reads configuration variables from a .env file. Use heroku config to view an app’s configuration variables in a terminal. Use the following command to add a configuration variable to a local .env file:

$ heroku config:get cachetogo -s  >> .env

Don’t commit credentials and other sensitive configuration variables to source control. In Git exclude the .env file with: echo .env >> .gitignore.

For more information, see the Heroku Local article.

Configuring Your Application

After provisioning, Cache To Go sets the CACHETOGO_URL environment variable. Use this variable to configure your application:

Using Redis from Ruby

require 'redis'

if ENV['CACHETOGO_URL']
  $redis = Redis.new(url: ENV['CACHETOGO_URL'])
end

Using Redis from Java

For Java applications, use the following method to integrate Cache To Go:

import redis.clients.jedis.Jedis;

public class RedisExample {
    public static void main(String[] args) {
        String redisUrl = System.getenv("CACHETOGO_URL");
        Jedis jedis = new Jedis(redisUrl);

        // Your code here
    }
}

Using Redis from Python

In Python, you can integrate Cache To Go like this:

import os
import redis

redis_url = os.getenv('CACHETOGO_URL')
redis_client = redis.Redis.from_url(redis_url)

# Your code here

Using Redis from Node.js

For integrating Cache To Go in a Node.js application, use the following example:

const redis = require('redis');
const client = redis.createClient(process.env.CACHETOGO_URL);

client.on('connect', function() {
    console.log('Connected to Redis');
});

// Your code here

Using Redis from PHP

To integrate Cache To Go with a PHP application:

<?php
if (getenv('CACHETOGO_URL')) {
    $redis = new Redis();
    $redis->connect(getenv('CACHETOGO_URL'));

    // Your code here
}
?>

Using Redis from Go:

package main

import (
    "github.com/go-redis/redis"
    "os"
)

func main() {
    redisURL := os.Getenv("CACHETOGO_URL")
    opt, err := redis.ParseURL(redisURL)
    if err != nil {
        panic(err)
    }

    client := redis.NewClient(opt)

    // Your code here
}

These snippets provide a basic guide for integrating Cache To Go into various applications. Be sure to include additional details specific to your add-on’s capabilities and configurations.

Migrating Between Plans

Application owners must carefully manage the migration timing to ensure proper application function during the migration process.

Use the heroku addons:upgrade command to migrate to a new plan.

heroku addons:upgrade cachetogo:new-plan

Removing the Add-On

Exporting Your Data Before Removal

Before removing the add-on, it’s important to ensure that your data is safe and retrievable. Cache To Go offers a manual process for data export:

  1. Email the support team at support@cachetogo.com with the subject line “Data Export Request”.

  2. Include your account and add-on details in the email.

  3. Cache To Go’s support team processes your request and provides you with a link to download your data.

Remove Cache To Go from your application:

This action destroys all associated data and you can’t undo it!

heroku addons:destroy cachetogo

Support

Contact our support team for any questions or issues at support@cachetogo.com.

Additional Resources

  • Redis Official Documentation “`

Keep reading

  • All Add-ons

Feedback

Log in to submit feedback.

Zara 4 CloudAMQP

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices