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

PHP Zone: PHP Access Control - PHP5 CMS Framework Development

9Lessons: Facebook Graph API Connect with PHP and Jquery

Rob Allen: Globally overriding validation messages for ZF2 forms

Sameer Borate's Blog: Templating with Haml

Evert Pot's Blog: Creating a Gopher server with PHP and InetD


Community Events





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


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

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