phpFastCache PHP 缓存库

程序名称:phpFastCache

授权协议: MIT

操作系统: 跨平台

开发语言: PHP

phpFastCache 介绍

phpFastCache 是一个开源的 PHP 缓存库,只提供一个简单的 PHP 文件,可方便集成到已有项目,支持多种缓存方法,包括:apc,
memcache, memcached, wincache, files, pdo and mpdo。可通过简单的 API 来定义缓存的有效时间。

示例代码:

<?php
    // In your config file
    include("php_fast_cache.php");
    // This is Optional Config only. You can skip these lines.
    // phpFastCache support "apc", "memcache", "memcached", "wincache" ,"files", "pdo", "mpdo" and "xcache"
    // You don't need to change your code when you change your caching system. Or simple keep it auto
    phpFastCache::$storage = "auto";
    // End Optionals

    // In your Class, Functions, PHP Pages
    // try to get from Cache first.
    $products = phpFastCache::get("products_page");

    if($products == null) {
        $products = YOUR DB QUERIES || GET_PRODUCTS_FUNCTION;
        // set products in to cache in 600 seconds = 10 minutes
        phpFastCache::set("products_page",$products,600);
    }

    foreach($products as $product) {
        // Output Your Contents HERE
    }
?>

phpFastCache 官网

http://www.phpfastcache.com/

相关编程语言

BlazeDS 是一个基于服务器的Java 远程控制(remoting...
OVal 是一个可扩展的Java对象数据验证框架,验证的规...
Volta 是一套开发工具,专为开发分布式、实时系统应...
OpenDDS 是一个开源的 C++ 实现的 对象管理组织 OMG...
JADE (Java Agent DEvelopment Framework) 是一个完...
FastMM ,在D2006和2007中已代替了原来的内存管理器。