Skip to content

code-tool/pcache

 
 

Repository files navigation

                                   __
            ____  _________ ______/ /_  ___
           / __ \/ ___/ __ `/ ___/ __ \/ _ \
          / /_/ / /__/ /_/ / /__/ / / /  __/
         / .___/\___/\__,_/\___/_/ /_/\___/
        /_/

Extension for PHP local cache (support PHP version 7)

Thanks to @leandre https://github.com/nly

functions list:

    1. pcache_set($key, $value, $expire = 0);
    1. pcache_get($key);
    1. pcache_del($key);

Example:

<?php

pcache_set("myname", "liexusong", 60); // 1 min expire

var_dump(pcache_get("myname"));

pcache_del("myname");

var_dump(pcache_get("myname"));

?>

php.ini

pcache.buckets_size = 1000       ; set the HashTable buckets size
pcache.cache_size = 1048576      ; set memory caches size
pcache.enable = 1                ; enable pcache extension

Releases

No releases published

Packages

No packages published

Languages

  • C 92.9%
  • M4 3.8%
  • PHP 1.5%
  • CMake 1.3%
  • JavaScript 0.5%