untoyou/cacher

一个快速简单的缓存工具,用于存储和检索来自/至平面文件缓存系统中的内容。

1.0 2014-11-19 01:28 UTC

This package is not auto-updated.

Last update: 2024-09-18 19:39:23 UTC


README

一个快速简单的缓存工具,用于存储和检索来自/至平面文件缓存系统中的内容。

## 安装 由于这是一个平面文件缓存,您需要一个具有适当写权限的目录。

## 使用 在您拥有一个目录后,可以像这样启动 Cacher:

$cache = new \Untoyou\Cacher('/var/tmp/cache');  //replace this with the path to your cache directory.
$cache->store('key', $html);
if ($cache->contains('key')) {
	$html = $cache->fetch('key');		
}