(PECL yac >= 1.0.0)
Yac::__set — Store a value using property syntax
Stores a value in the cache, invoked when writing a property of a
Yac instance: $yac->foo = "bar"
is equivalent to $yac->set("foo", "bar"), with no
ttl.
keyThe property name, used as the cache key.
valueThe value to store. Every PHP type except resource can be stored.
Returns the stored value.
例1 Yac::__set() example
<?php
$yac = new Yac();
$yac->foo = "bar"; // stored without a ttl
var_dump($yac->get("foo")); // string(3) "bar"
?>