Predis is a flexible and feature-complete PHP client library for Redis. This is a maintenance release for the 0.6 series that mainly features internal optimizations, a more stable support for transactions (MULTI/EXEC) and comes with a bunch of new commands for Redis 2.2-dev. As with previous releases, Predis is also available for PHP 5.2 with an officially supported backport (PHP >= 5.2.6). What follows is an overview of the new features introduced in this new release. For a more in-depth list of changes please see the CHANGELOG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # compl1.rb - Redis autocomplete example | |
| # download female-names.txt from http://antirez.com/misc/female-names.txt | |
| require 'rubygems' | |
| require 'redis' | |
| r = Redis.new | |
| # Create the completion sorted set | |
| if !r.exists(:compl) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 17:33:39 encoder | guys, what's the best PHP client for redis out there? | |
| 17:34:16 ronr_ | the one that involves not using PHP? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'luarocks.require' | |
| require 'mercury' | |
| require 'redis' | |
| module('redis_app', package.seeall, mercury.application) | |
| local templates = { | |
| index = [[ | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C:\IronRuby\v1.1.0>ir json_speed.rb pure | |
| Rehearsal ------------------------------------ | |
| 474.906250 39.421875 514.328125 (394.262696) | |
| ------------------------- total: 514.328125sec | |
| user system total real | |
| 482.531250 43.140625 525.671875 (384.509766) | |
| C:\IronRuby\v1.1.0>ir json_speed.rb ext | |
| Rehearsal ------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * The code in this file is a modification of a file in | |
| * the predis project, and is thus governed by the same | |
| * license. For details, please see: | |
| * | |
| * http://github.com/nrk/predis/blob/master/LICENSE | |
| */ | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RubyArray.java:771:in `eltInternal': java.lang.ArrayIndexOutOfBoundsException: 1 | |
| from Pack.java:1343:in `encode' | |
| from Pack.java:1640:in `pack' | |
| from RubyArray.java:3852:in `pack' | |
| from org/jruby/RubyArray$i_method_1_0$RUBYINVOKER$pack.gen:65535:in `call' | |
| from CachingCallSite.java:309:in `cacheAndCall' | |
| from CachingCallSite.java:148:in `call' | |
| from test.rb:1:in `__file__' | |
| from test.rb:-1:in `load' | |
| from Ruby.java:685:in `runScript' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Loaded suite ipaddress\ipv4_test | |
| Started | |
| ......F................................. | |
| Finished in 2.302 seconds. | |
| 1) Failure: | |
| test_initialize_format_error(IPv4Test) [ipaddress\ipv4_test.rb:74]: | |
| <ArgumentError> exception expected but was | |
| Class: <Java::JavaLang::ArrayIndexOutOfBoundsException> | |
| Message: <"1"> |
Predis is a flexible and feature-complete PHP client library for Redis. This is a maintenance release for the 0.6 series featuring some internal optimizations and a more stable and consistent support for pipelines and transactions (MULTI/EXEC) without any breaking changes. As with previous releases, Predis is also available for PHP 5.2 with an officially supported backport (PHP >= 5.2.6). What follows is an overview of the new features introduced in this new release. For a more in-depth list of changes please see the CHANGELOG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| redis_version:1.3.15 | |
| redis_git_sha1:00000000 | |
| redis_git_dirty:0 | |
| arch_bits:32 | |
| multiplexing_api:select | |
| process_id:3160 | |
| uptime_in_seconds:48 | |
| uptime_in_days:0 | |
| connected_clients:1 | |
| connected_slaves:0 |