News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPMaster.com:
An Introduction to Redis in PHP using Predis
May 03, 2012 @ 09:35:21

On PHPMaster.com today there's a new tutorial by Daniel Gafitescu showing you how to work with Redis (a key-value store) via PHP with the help of the Predis library.

There is a lot of argument whether Redis or Memcache is better, though as the benchmarks show they perform pretty much on par with each other for basic operations. Redis has more features than Memcache has, such as in-memory and disk persistence, atomic commands and transactions, and not logging every change to disk but rather server-side data structures instead. In this article we'll take a look at some of the basic but powerful commands that Redis has to offer using the Predis library.

He helps you get a local redis server up and running and includes a link to the repository for the latest version of the Predis library. Some sample code is provided showing how to connect to the server, push data into a key/value combination, get the value back out, increment it and check to see if it exists. He also talks about some of the available data types Redis provides and a few other more complex operations you can perform on things other than strings.

0 comments voice your opinion now!
predis redis tutorial library connect server


blog comments powered by Disqus

Similar Posts

Chris Cassell's Blog: Creating Magic Methods in PHP

DevShed: Building File Uploaders with PHP 5

SitePoint.com: Advanced PHPUnit Testing: Annotations and Mocking

Pádraic Brady's Blog: RESTful Web Services with Zend Framework

William Candillon's Blog: Running Zorba with PHP


Community Events





Don't see your event here?
Let us know!


language opinion interview voicesoftheelephpant deployment community list bugfix library series tips package install api podcast release framework laravel symfony introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework