| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Tue, 23 Dec 2025 11:02:37 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20091025104026
location: https://web.archive.org/web/20091025104026/https://github.com/fauna/memcached/
server-timing: captures_list;dur=1.780170, exclusion.robots;dur=0.060117, exclusion.robots.policy;dur=0.044819, esindex;dur=0.010725, cdx.remote;dur=16.928653, LoadShardBlock;dur=306.918955, PetaboxLoader3.datanode;dur=149.286635, PetaboxLoader3.resolve;dur=47.181955
x-app-server: wwwb-app213-dc8
x-ts: 302
x-tr: 387
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app213; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Tue, 23 Dec 2025 11:02:38 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sun, 25 Oct 2009 10:40:26 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "e71b68170480faef5dc89b406d8925b2"
x-archive-orig-x-runtime: 153ms
x-archive-orig-content-length: 30561
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 25 Oct 2009 10:40:26 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: webgroup-20100505163643-00028/ARCHIVEIT-1147-WEEKLY-AVVNXU-20091025103949-00040-crawling105.us.archive.org.warc.gz
server-timing: captures_list;dur=0.500220, exclusion.robots;dur=0.019311, exclusion.robots.policy;dur=0.009127, esindex;dur=0.009592, cdx.remote;dur=6.852941, LoadShardBlock;dur=148.233652, PetaboxLoader3.datanode;dur=133.797706, PetaboxLoader3.resolve;dur=122.358380, load_resource;dur=141.291873
x-app-server: wwwb-app213-dc8
x-ts: 200
x-tr: 351
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
fauna's memcached at master - GitHub
Hi! fauna is using GitHub to share code with you!
But GitHub is more than just a place to share code. It's a place to keep tabs on your favorite developers and projects, easily contribute fixes and new features, and visualize what's going on inside your codebase!
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| Description: | A Ruby interface to the libmemcached C client edit |
| Homepage: | https://blog.evanweaver.com/files/doc/fauna/memcached/ edit |
| Public Clone URL: |
git://github.com/fauna/memcached.git
Give this clone URL to anyone.
git clone git://github.com/fauna/memcached.git
|
| Your Clone URL: |
Use this clone URL yourself.
git clone git@github.com:fauna/memcached.git
|
Evan Weaver (author)
Tue Oct 20 18:47:37 -0700 2009
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Oct 07 10:23:24 -0700 2009 | Stupid gitignore. [Evan Weaver] |
| |
.gitmodules | Fri Nov 14 03:50:16 -0800 2008 | Add the libmemcache HG repository and build it ... [antifuchs] |
| |
BENCHMARKS | Mon Sep 21 19:21:46 -0700 2009 | Retool all benchmarks. Provide _orig versions o... [Evan Weaver] |
| |
CHANGELOG | Tue Oct 20 13:31:37 -0700 2009 | Changelog. [Evan Weaver] |
| |
LICENSE | Sun Jan 20 01:16:17 -0800 2008 | license [evan] |
| |
Manifest | Mon Sep 21 13:32:09 -0700 2009 | Put custom features in patchfile. [Evan Weaver] |
| |
README | Tue Sep 22 01:51:11 -0700 2009 | README [Evan Weaver] |
| |
Rakefile | Mon Aug 03 15:30:16 -0700 2009 | Clean pattern. [Evan Weaver] |
| |
TODO | Sun Jun 22 02:02:51 -0700 2008 | Update TODOs. [Evan] |
| |
ext/ | Mon Oct 12 13:32:36 -0700 2009 | Check types of strings in a multiget array (nk). [Evan Weaver] |
| |
lib/ | Tue Oct 20 18:47:37 -0700 2009 | Better error in stats. [Evan Weaver] |
| |
test/ | Tue Oct 20 18:47:37 -0700 2009 | Better error in stats. [Evan Weaver] |
README
memcached An interface to the libmemcached C client. == License Copyright 2009 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file. Portions copyright 2007-2009 TangentOrg, Brian Aker, licensed under the BSD license, and used with permission. The public certificate for this gem is here[https://rubyforge.org/frs/download.php/25331/evan_weaver-original-public_cert.pem]. If you use this software, please {make a donation}[https://blog.evanweaver.com/donate/], or {recommend Evan}[https://www.workingwithrails.com/person/7739-evan-weaver] at Working with Rails. == Features * clean API * robust access to all memcached features * multiple hashing modes, including consistent hashing * ludicrous speed, including optional non-blocking IO The <b>memcached</b> library wraps the pure-C libmemcached client via SWIG. == Installation You need Ruby 1.8.7 or Ruby 1.9.1. Other versions may work, but are not guaranteed. You also need {memcached itself}[https://www.danga.com/memcached/] if you want to test against a local server. Install the gem: sudo gem install memcached --no-rdoc --no-ri == Usage Start a local networked memcached server: $ memcached -p 11211 & Now, in Ruby, require the library and instantiate a Memcached object at a global level: require 'memcached' $cache = Memcached.new("localhost:11211") Now you can set things and get things: value = 'hello' $cache.set 'test', value $cache.get 'test' #=> "hello" You can set with an expiration timeout: value = 'hello' $cache.set 'test', value, 1 sleep(2) $cache.get 'test' #=> raises Memcached::NotFound You can get multiple values at once: value = 'hello' $cache.set 'test', value $cache.set 'test2', value $cache.get ['test', 'test2', 'missing'] #=> {"test" => "hello", "test2" => "hello"} You can set a counter and increment it: start = 1 $cache.set 'counter', start, 0, false $cache.increment 'counter' #=> 2 $cache.increment 'counter' #=> 3 $cache.get('counter', false).to_i #=> 3 You can get some server stats: $cache.stats #=> {..., :bytes_written=>[62], :version=>["1.2.4"] ...} Note that the API is not the same as that of <b>Ruby-MemCache</b> or <b>memcache-client</b>. In particular, <tt>nil</tt> is a valid record value. Memcached#get does not return <tt>nil</tt> on failure, rather it raises <b>Memcached::NotFound</b>. This is consistent with the behavior of memcached itself. For example: $cache.set 'test', nil $cache.get 'test' #=> nil $cache.delete 'test' $cache.get 'test' #=> raises Memcached::NotFound == Legacy applications There is a compatibility wrapper for legacy applications called Memcached::Rails. == Threading <b>memcached</b> is threadsafe, but each thread requires its own Memcached instance. Create a global Memcached, and then call Memcached#clone each time you spawn a thread. thread = Thread.new do cache = $cache.clone # Perform operations on cache, not $cache cache.set 'example', 1 cache.get 'example' end # Join the thread so that exceptions don't get lost thread.join == Benchmarks <b>memcached</b> is up to 10x faster than <b>memcache-client</b>. See BENCHMARKS[link:files/BENCHMARKS.html] for details. == Reporting problems The support forum is here[https://rubyforge.org/forum/forum.php?forum_id=20894]. Patches and contributions are very welcome. Please note that contributors are required to assign copyright for their additions to Cloudburst, LLC. == Further resources * {Memcached wiki}[https://www.socialtext.net/memcached/index.cgi] * {Libmemcached homepage}[https://tangent.org/552/libmemcached.html]
This feature is coming soon. Sit tight!








