zoukankan      html  css  js  c++  java
  • PHP 加速器的安装 xcache

    安装
    # wget http://xcache.lighttpd.net/pub/Releases/1.3.1/xcache-1.3.1.tar.gz
    # tar xzvf xcache-1.3.1.tar.gz
    # cd xcache-1.3.1
    # /usr/local/php-5.3.5/bin/phpize
    # /configure --with-php-config=/usr/local/php-5.3.5/bin/php-config --enable-xcache
    # make 
    # make install
    # cat xcache.ini >> /usr/local/php-5.3.5/lib/php.ini
     
    # vim /usr/local/php-5.3.5/lib/php.ini
     
    extension = xcache.so
     
    test
    <?php
    $key = 'key1';
    if(!xcache_isset($key)){
        xcache_set($key,'test',120); //save for 2 minutes
    }
    $value = xcache_get($key);
    echo $value;
    ?>
     
    xcache Api
    Common Used Functions:
    mixed xcache_get(string name)
    bool  xcache_set(string name, mixed value [, int ttl])
    bool  xcache_isset(string name)
    bool  xcache_unset(string name)
    bool  xcache_unset_by_prefix(string prefix)
    int   xcache_inc(string name [, int value [, int ttl]])
    int   xcache_dec(string name [, int value [, int ttl]])
     
    Administrator Functions(See xcache/admin/*.php):
    int    xcache_count(int type)
    array  xcache_info(int type, int id)
    array  xcache_list(int type, int id)
    void   xcache_clear_cache(int type, int id)
    string xcache_coredump(int op_type)
     
    Coverager Functions:
    array xcache_coverager_decode(string data)
    void  xcache_coverager_start([bool clean = true])
    void  xcache_coverager_stop([bool clean = false])
    array xcache_coverager_get([bool clean = false])
     
    Opcode Functions(See xcache/Decompiler.class.php):
    string xcache_asm(string filename)
    string xcache_dasm_file(string filename)
    string xcache_dasm_string(string code)
    string xcache_encode(string filename)
    bool   xcache_decode(string filename)
     
    string xcache_get_op_type(int op_type)
    string xcache_get_data_type(int type)
    string xcache_get_opcode(int opcode)
    string xcache_get_op_spec(int op_type)
    string xcache_get_opcode_spec(int opcode)
    mixed  xcache_get_special_value(zval value)
    string xcache_is_autoglobal(string name)
  • 相关阅读:
    单片机基础
    EM310_AT收到的短信分析
    [原]改动CImage以实现以指定的质量保存Jpeg图像
    [原创]巧用DOS命令改子目录中的文件名
    二个月零七天,我女儿会翻身了
    [原]用正则得到HTML中所有的图片路径
    新文章:把程序放在相册中
    [原]用三行代码实现对音量的控制,实现增大,减小,静音
    BIOS中隐藏Telnet后门
    CoolChm 注册机的编写
  • 原文地址:https://www.cnblogs.com/liqiu/p/2585030.html
Copyright © 2011-2022 走看看