nazo/safeapc

APC Cache Safe Using Wrapper

0.3 2022-03-09 06:32 UTC

This package is not auto-updated.

Last update: 2024-06-12 17:27:18 UTC


README

Usage

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');

clear all cache

change version key