Skip to content

bbrothers/ReFill

Repository files navigation

#ReFill A PHP/Redis library for caching auto-complete queries.

####Dependancies: Uses the Predis Client

###Usage: Instantiate:

$connection = new Predis\Client([
    "scheme" => "tcp",
    "host"   => "127.0.0.1",
    "port"   => 6379
]);

$refill = new ReFill($connection);

Cache a collection:

$refill->catalog('names', ReFillCollection::fromArray($list));

Find a match:

$refill->match('names', $term, $maxNumberOfResults)

#TODO: - revisit unique id - invalidate cache - improve test coverage - renaming/refactoring - multiple fragment search (redis intersect) - add exceptions/error handling - add a filterable attribute to allow results to be filtered by an intersect

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages