Skip to content

tikaszvince/key-value-store-memcache

Repository files navigation

Key Value Memcache Store

Author Build Status Coverage Status Software License Packagist Version

Description

This library provides a layer to a key value memcache store.

It uses the memcache extension.

Check out the abstract library to see the other adapters and the Api.

Installation

Install it through composer.

{
    "require": {
        "tikaszvince/key-value-store-memcache": "@stable"
    }
}

tip: you should browse the tikaszvince/key-value-store-memcache page to choose a stable version to use, avoid the @stable meta constraint.

Usage

<?php
use AdammBalogh\KeyValueStore\KeyValueStore;
use AdammBalogh\KeyValueStore\Adapter\MemcacheAdapter as Adapter;

$memcacheClient = new Memcache();
$memcacheClient->addServer('localhost', 11211);

$adapter = new Adapter($memcacheClient);

$kvs = new KeyValueStore($adapter);

$kvs->set('sample_key', 'Sample value');
$kvs->get('sample_key');
$kvs->delete('sample_key');

API

Please visit the API link in the abstract library.

Toolset

Key Value Server
✔ delete ✔ get ✔ flush
✔ expire ✔ set
✔ getTtl
✔ has
✔ persist

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages