PHP的虚拟对象缓存。

1.0.0 2023-05-18 02:05 UTC

This package is auto-updated.

Last update: 2024-09-06 16:32:40 UTC


README

描述

PHP的虚拟对象缓存。

安装

composer require nickolasburr/ocache:^1.0

示例

...

use function Ocache\cache;

$cache = cache();
$entry = $cache->get('example');

if ($entry === null) {
    $entry = new \ArrayIterator(range(0, 10));
    $cache->set('example', $entry);
}

...