Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
No description, website, or topics provided.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Type||Name||Latest commit message||Commit time|
|Failed to load latest commit information.|
This small application illustrates Ehcache Cache Writers & Cache Loaders. It is a web application that can be launched using Maven, by running: mvn jetty:run This will start jetty and you should be able to connect to http://localhost:8080/raffle/ When filling out the form, the information will be sent to org.terracotta.ehcache.raffle.web.ParticipateServlet Which in turn will check whether the key (the email address) is already present in the cache and then add an entry using the putWithWriter method. The "participants" cache is using the org.terracotta.ehcache.raffle.CsvWriter which stores cached entries in a CSV file in the user's home driectory. Going to http://localhost:8080/raffle/winners will trigger an asynchronous bulk load from the CSV file. Upon the first request, at the bottom of the page, the registered participants should indicate 0. Wait a little and refresh the page until all participants have been loaded... The loading happens through the index.jsp page in the winners directory, which asks the Cache to load using org.terracotta.ehcache.raffle.CsvLoader.