| CARVIEW |
Select Language
HTTP/2 200
server: nginx
date: Sat, 17 Jan 2026 04:18:24 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=0.557251, exclusion.robots;dur=0.040237, exclusion.robots.policy;dur=0.031388, esindex;dur=0.008281, cdx.remote;dur=25.747747, LoadShardBlock;dur=243.808830, PetaboxLoader3.datanode;dur=125.043075, PetaboxLoader3.resolve;dur=102.340913, load_resource;dur=100.194896
x-app-server: wwwb-app245-dc8
x-ts: 200
x-tr: 446
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app245; 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=()
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

