Update cache to delete on retrieve instead of using timeouts
Add basic unit tests for index.js