Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Heroku Cookbook
  • Table Of Contents Toc
Heroku Cookbook

Heroku Cookbook

By : Coutermarsh
4.8 (4)
close
close
Heroku Cookbook

Heroku Cookbook

4.8 (4)
By: Coutermarsh

Overview of this book

Heroku is a Platform as a Service that enables developers to rapidly deploy and scale their web applications. Heroku is designed for developer happiness, freeing developers from doing system administrative tasks such as configuring servers and setting up load balancers. Developers are able to focus on what they do best, building web applications, while leaving the details of deployment and scaling to the experts at Heroku. This practical guide is packed with step-by-step solutions to problems faced by every production-level web application hosted on Heroku. You'll quickly get comfortable with managing your Heroku applications from the command line and then learn everything you need to know to deploy and administer production-level web applications.
Table of Contents (12 chapters)
close
close
11
Index

Adding Redis to a Rails application


Redis is a high-performance, in-memory, key-value store with persistence. It's a great alternative to memcached for caching, with the additional functionality of a NoSQL data store. Here, we will learn how to add Redis to our application and set it up to be used as a cache.

Getting ready…

We'll first set up a Redis server on our development machine using the following steps:

  1. Let's start by installing Redis.

    On OS X, we can use Homebrew to install Redis with the following command:

    $ brew install redis
    

    For Ubuntu, we can use apt-get:

    $ sudo apt-get update
    $ sudo apt-get install redis-server
    

    For other operating systems, we can get installation instructions from the Redis website (http://redis.io/download).

  2. Once installed, we can verify that our installation is working by trying out a couple of commands. Redis comes with a command-line program, redis-cli.

    Let's start it up and try setting and getting a key/value pair:

    $ redis-cli
    $ set testing 123
    OK
    $ get testing...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Heroku Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon