The check point

In this chapter, we created two new configurations: AsyncConfiguration, which will allow us to use the @Async annotation to submit tasks to an executor, and CacheConfiguration, which will create a CacheManager interface and allow us to use the @Cacheable annotation. Since we can use Redis as a cache manager, we also amended the RedisConfig class.

We created a SearchCache class, which contained a cache of tweets, and we now have two TwitterSearch implementations to choose from: good old SearchService, which will fetch each result synchronously, and ParallelSearchService, which will issue each query in a different thread:

The check point
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.76.164