Added an expires method to set cache expiry.