1

I'm looking for examples for testing a couple of Caffiene caches I have implemented (one has a timed expiry that is cache-wide and the other has a timed expiry variable per entry using the Expiry interface). Tried to search for good examples online but have not found any well documented ones.

RRG
  • 105
  • 9
  • Do you think the wiki entry, [Testing](https://github.com/ben-manes/caffeine/wiki/Testing), should be expanded on? If so, recommendations? – Ben Manes Aug 24 '18 at 17:34
  • Yes, that would certainly help! More examples of how cache testing would greatly help for people who are new to caching implementations. I tried using the Fake Timer example but am having trouble getting it to work. Not sure if I should be looking at Guava cache testing examples (if any)? – RRG Aug 25 '18 at 20:51
  • Perhaps if you provide pseudo code of what you want, I can provide you the corresponding test cases? The `FakeTimer` example appeared to work when I changed key/value to real types, e.g. `Integer`, and fixed a missing closing parans on the assert. – Ben Manes Aug 25 '18 at 21:08
  • I'm sorry I forgot to get back to you! It turns out it was a weird dependency issue that was causing compilation to fail on the FakeTimer test example. Works great now and I also finished the implementation and unit tests for the cache! Thank you! :) – RRG Oct 23 '18 at 18:35
  • Oh that's wonderful! Thanks for the update :) – Ben Manes Oct 23 '18 at 18:36

0 Answers0