Category : Cache

Last articleEureka Cache MechanismThis paper introduces the caching mechanism of Eureka. I believe everyone has a better understanding of Eureka. This paper will introduce in detail how API gateway realizes real-time sensing of service downline. I introduction In cloud-based microservice applications, the network locations of service instances are dynamically allocated. Moreover, due to automatic scaling, ..

Read more

Maven dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>19.0</version> </dependency> Guava cache is used here. Configuration (configuration file or java configuration) Configuration file spring.cache.type=guava spring.cache.cache-names=cache1,cache2 spring.cache.guava.spec=maximumSize=500,expireAfterAccess=5m Java configuration @Configuration @EnableCaching public class CacheConfig { public static final String CACHE1 = “cache1”; public static final String CACHE2 = “cache2”; @Bean public Cache cache1() { return ..

Read more

The idea of caching has a long history. Simply put, the purpose of caching is to save the calculation results that need expensive expenses and take them out directly when needed in the future, avoiding double calculation. The essence of all caches is the same. There are countless applications of cache in computers and even ..

Read more

Order This article mainly describes the Cache Aside mode of the lower cache. Cache Aside There are two main points: The application program first fetches data from the cache, and if it does not get it, it fetches data from the database and puts it into the cache after success. The update is to update ..

Read more