@PeterN
You said that this was wrong:
$m->set('object', new stdclass, time() + 300);
And instead this is the correct way:
$m->set('object', new stdclass, 300);
When actually, they are both correct. Expiration looks at the time given, if the number is less than or equal to 30 days(60 * 60 * 24 * 30 = 2,592,000), then it expires in that many seconds. If the number is greater than 30 days, then it expires at that UNIX time.