set (key => value, [timeout])

$cache->set(mykey=>'the data to cache', '15 minutes'); if($cache->status eq FAILURE) { warn("can't save data to cache: $cache->error"); }

key (required): key to set

value (required): value to set

timeout (optional): can be on of EXPIRES_NOW, EXPIRES_NEVER (need import of :expires tag), or a time string like "10 minutes", "May 5 2010 01:30:00"... (see Time::ParseDate).

On failure this method return undef() and place status method to FAILURE.

status : FAILURE SUCCESS