• 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)
  • 相关阅读:
    CSS(十二)--响应式布局
    CSS(十一)-- 手机像素
    CSS(十)-- 弹性盒子
    CSS常用属性
    CSS(九)-- less(css的预处理语言)
    CSS(八)-- 变形(过渡、动画、平移、旋转、缩放)
    HTML(二)-- 表格、表单
    原生javascript实现模拟拖拽事件
    JavaScript检测数据类型及模仿jQuery中的数据类型检测
    JavaScript数组常用方法总结
  • 原文地址:https://www.cnblogs.com/liqiu/p/2585030.html
Copyright © 2020-2023  润新知