更多>
最新下载
24小时阅读排行榜
- 1 SOAP协议和XML是什么关系 SOAP消息结构详解
- 2 C++怎么获取环境变量 C++ getenv函数读取系统变量【配置】
- 3 EDIFACT到XML映射的常见陷阱
- 4 php数据库怎么进localhost的mysql_php连本机mysql步骤【步骤】
- 5 Golang如何使用encoding/csv处理CSV文件_Golang CSV文件读写操作
- 6 如何在Golang中包装错误信息_Golang errors包与错误包装方法
- 7 Docker 命令行中如何正确传递多个 --dns 等列表型参数
- 8 如何在 PHP 中安全输出 XML 内容前添加纯文本提示
- 9 css 想让元素在拖动结束后回弹动画怎么办_使用 transform translate keyframes 设置回弹效果
- 10 html5日期格式周数怎么表示_html5日期周数格式写法【说明】
- 11 css grid项目间垂直对齐不正确怎么办_使用align-items和align-self调整
- 12 XML序列化是什么 如何将对象转换为XML字符串
- 13 Linux 进程调度器的工作原理解析
- 14 php代码示例如何操作session_php session操作代码示例【示例】
- 15 css flexbox 如何实现导航栏常见结构_通过左右分布与居中说明
更多>
最新教程
-
- Node.js 教程
- 16338 2025-08-28
-
- CSS3 教程
- 1547048 2025-08-27
-
- Rust 教程
- 23454 2025-08-27
-
- Vue 教程
- 25886 2025-08-22
-
- PostgreSQL 教程
- 22382 2025-08-21
-
- Git 教程
- 9330 2025-08-21
下载首页 / 类库下载 / 其它类库
phpFastCache是一个开源的PHP缓存库,只提供一个简单的PHP文件,可方便集成到已有项目,支持多种缓存方法,包括:apc, memcache, memcached, wincache, files, pdo and mpdo。可通过简单的API来定义缓存的有效时间。
<?php // In your config file
include("phpfastcache/phpfastcache.php");
phpFastCache::setup("storage","auto"); // phpFastCache support "apc", "memcache", "memcached", "wincache" ,"files", "sqlite" and "xcache"
// You don't need to change your code when you change your caching system. Or simple keep it auto
$cache = phpFastCache(); // In your Class, Functions, PHP Pages
// try to get from Cache first. product_page = YOUR Identity Keyword
$products = $cache->get("product_page"); if($products == null) { $products = YOUR DB QUERIES || GET_PRODUCTS_FUNCTION; // set products in to cache in 600 seconds = 10 minutes
$cache->set("product_page", $products,600);
} // Output Your Contents $products HERE
本站所有资源都是由网友投搞发布,或转载各大下载站,请自行检测软件的完整性!本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!如有侵权请联系我们删除下架,联系方式:admin@php.cn
