I am using dropwizard to create a RESTful service. To avoid hammering the database, I am looking for a good caching solution in java. Searching the web lead me to ehcache. I have read the documentation a bit, but currently it is not clear to me how to use ehcache in a dropwizard project.
For instance, where does the configuration file go? I just need something to help me start using the cache.
If this is difficult to integrate, what would be the most suited caching solution for dropwizard project?
If you ultimately want a simpler (than ehcache) cache framework/API, consider using CacheBuidler from guava:
https://code.google.com/p/guava-libraries/wiki/CachesExplained
A typical cache implementation and use requires just a few lines of code and no configuration files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With