(PECL yac >= 1.0.0)
The Yac class is the interface to the cache. Every instance on the same host is a lightweight handle to one shared cache: all instances read and write the same entries, and creating one does no allocation beyond the handle itself.
The optional prefix passed to Yac::__construct() is prepended to every key, so several instances (or applications) can share one cache without their keys colliding. Besides the classic cache operations (Yac::add(), Yac::set(), Yac::get(), Yac::delete() and Yac::flush()), the class provides Yac::info() and Yac::dump() for inspecting the cache, and overloads property access so that reading or writing an object property reads or writes a cache entry.
The key prefix set through
Yac::__construct(). It is prepended to
every key used with the instance; no separator is inserted, so
include one in the prefix when needed. The prefix may not exceed
YAC_MAX_KEY_LEN (48) bytes.