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

Daniel Cousineau's Blog: Displaying N-Deep Trees (Remember Your Algorithms Course?)

DevShed: Working with Private Properties to Protect PHP 5 Class Data

PHPMaster.com: Listing Packages on Packagist for Composer

Zend Developer Zone: The value of Web services for PHP

DevShed: Building an Image Generator Class with PHP 5


Community Events





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


composer podcast release voicesoftheelephpant opinion laravel conference series framework community introduction list symfony version interview api configure unittest threedevsandamaybe language

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