nazo/safeapc

使用包装器实现APC缓存安全

0.3 2022-03-09 06:32 UTC

This package is not auto-updated.

Last update: 2024-10-02 18:55:24 UTC


README

用法

use SafeApc;

// initialize
$apc = new SafeApc();
$apc->setCacheStartTime($_SERVER['REQUEST_TIME']);
$apc->setCacheVersionKey(file_get_contents('apc_version'));


// set key
$apc->set('cache key', $value, 100);

// get key (throws SafeApcNotFoundException)
$apc->get('cache key');

// delete key
$apc->delete('cache key');

清除所有缓存

更改版本密钥