PHPackages                             qmegas/memcache-search - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. qmegas/memcache-search

ActiveLibrary[Caching](/categories/caching)

qmegas/memcache-search
======================

PHP library to search memcache keys

0.1.3(2y ago)361.4k—7.7%MITPHPPHP &gt;=7.1

Since Jun 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/qmegas/memcache-search)[ Packagist](https://packagist.org/packages/qmegas/memcache-search)[ RSS](/packages/qmegas-memcache-search/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (5)Used By (0)

Memcache Search
===============

[](#memcache-search)

PHP library that allows to search keys in memcache. It uses `lru_crawler` non-blocking mechanism to iterate between memcache keys. This libary **does not require memcache extension to be installed**.

Why it's better then other solution?
------------------------------------

[](#why-its-better-then-other-solution)

1. Standart [`Memcached`](https://www.php.net/manual/en/book.memcached.php) extension have function `getAllKeys` which is based on [`memcached_dump`](http://docs.libmemcached.org/memcached_dump.html) function which is not guarentee to dump all keys. Also it [reported](https://www.php.net/manual/en/memcached.getallkeys.php#123793) that staring memcache 1.4.23 this function does not work.
2. Standart [`Memcache`](https://www.php.net/manual/en/book.memcache.php) extension does not have such functionallity and have [different](https://stackoverflow.com/questions/9831395/how-can-i-query-memcached-with-php-to-get-a-list-of-all-its-keys-in-storage) [solutions](https://stackoverflow.com/questions/19560150/get-all-keys-set-in-memcached) based on `stats cachedump` which have memcache server performance impact and once again not guarentee to dump all keys.

Installation
------------

[](#installation)

```
composer require qmegas/memcache-search
```

Requirements
------------

[](#requirements)

- PHP &gt;= 7.1
- Memcache server should work on unix-like system and be &gt;= 1.4.24

Usage Examples
--------------

[](#usage-examples)

```
