GithubHelp home page GithubHelp logo

php_mini_cache's Introduction

php_mini_cache

this is php extension for minicache

required

usage

sudo ./install-sh

如果上面的安装错误,请检查是否php的版本有问题,如果版本没有问题请打开install-sh,查看phpize和php-config的路劲是否有问题

demo

<?php
    $object = new MiniCache("admin", "admin@minicache@123");
    $ret = $object->connect("127.0.0.1", 12345, 1); 
    if ($ret == FALSE) {
        throw new \Exception("conncet failed");
    }   

    $object->set("johnny", "wesleyxxxxxx");
    $object->del("johnny");
//  $str = $object->get("johnny");
    $object->lpush("johnny", "xxx");
    $object->lpush("johnny", "sss");
    $object->lpush("johnny", "zzz");
    var_dump($object->llen("johnny"));
    var_dump($object->list("johnny"));
    var_dump($object->lrange("johnny", 0, 1));
    $object->ldel("johnny", 1); 
    var_dump($object->list("johnny"));

    $object->hmset("wesley", "a1", "aaa");
    $object->hmset("wesley", "b1", "bbb");
    $object->hmset("wesley", "c1", "ccc");
    var_dump($object->hmget("wesley", "c1"));
    var_dump($object->hmdel("wesley", "c1"));
    $object->publish("que2", "hellojohnny");

    $object->subscribe("que1", function($message) {
        var_dump($message);
    }); 
?>

php_mini_cache's People

Contributors

johnnylei avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.