use cache and use datetime only when possible