| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 15 Jan 2026 17:44:31 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100717012712
location: https://web.archive.org/web/20100717012712/https://github.com/pda/flexihash
server-timing: captures_list;dur=1.259176, exclusion.robots;dur=0.100778, exclusion.robots.policy;dur=0.075306, esindex;dur=0.019620, cdx.remote;dur=95.291070, LoadShardBlock;dur=570.775198, PetaboxLoader3.datanode;dur=274.508030, PetaboxLoader3.resolve;dur=268.120462
x-app-server: wwwb-app214-dc8
x-ts: 302
x-tr: 725
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app214; 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: Thu, 15 Jan 2026 17:44:32 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sat, 17 Jul 2010 01:27:12 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "fda637385d8ab07fa3000cd46705553e"
x-archive-orig-x-runtime: 233ms
x-archive-orig-content-length: 24552
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: Sat, 17 Jul 2010 01:27:12 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: 52_16_20100716233836_crawl103_IndexOnly-c/52_16_20100717012706_crawl101.arc.gz
server-timing: captures_list;dur=7.050807, exclusion.robots;dur=0.025692, exclusion.robots.policy;dur=0.011504, esindex;dur=0.015768, cdx.remote;dur=66.862165, LoadShardBlock;dur=546.736615, PetaboxLoader3.datanode;dur=414.380564, PetaboxLoader3.resolve;dur=132.538237, load_resource;dur=101.469776
x-app-server: wwwb-app214-dc8
x-ts: 200
x-tr: 779
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
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
pda's flexihash at master - GitHub
pda / flexihash
- Font
- Commits
- Xarxa (4)
- Problemes (1)
- Descàrregues (0)
- Wiki (1)
- Gràfics
-
Branca:
master
clica aquí per a afegir una descripció
clica aquí per a afegir una pàgina d'inici
| nom | edat | missatge | |
|---|---|---|---|
| |
.gitignore | Tue Mar 24 17:43:06 -0700 2009 | Added 'build' directory to .gitignore [pda] |
| |
.gitmodules | Loading commit data... |
|
| |
LICENCE | ||
| |
README.md | ||
| |
classes/ | ||
| |
include/ | ||
| |
lib/ | ||
| |
scripts/ | ||
| |
tests/ | Mon Apr 21 00:48:55 -0700 2008 | Flattened directory structure for increased sim... [pda] |
README.md
Flexihash
Flexihash is a small PHP library which implements [https://en.wikipedia.org/wiki/Consistent_hashing consistent hashing], which is most useful in distributed caching. It requires PHP5 and uses [https://simpletest.org/ SimpleTest] for unit testing.
Usage Example
<?php
$hash = new Flexihash();
// bulk add
$hash->addTargets(array('cache-1', 'cache-2', 'cache-3'));
// simple lookup
$hash->lookup('object-a'); // "cache-1"
$hash->lookup('object-b'); // "cache-2"
// add and remove
$hash
->addTarget('cache-4')
->removeTarget('cache-1');
// lookup with next-best fallback (for redundant writes)
$hash->lookupList('object', 2); // ["cache-2", "cache-4"]
// remove cache-2, expect object to hash to cache-4
$hash->removeTarget('cache-2');
$hash->lookup('object'); // "cache-4"
Further Reading
- https://www.spiteful.com/2008/03/17/programmers-toolbox-part-3-consistent-hashing/
- https://weblogs.java.net/blog/tomwhite/archive/2007/11/consistent_hash.html

