Add Carbon/Datetime argument to cache
Fix bugs and write tests.