Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

RedisCacheManager json serializer

@Bean
public RedisCacheManager redisCacheManager(LettuceConnectionFactory lettuceConnectionFactory) {
    RedisCacheConfiguration redisCacheConfiguration = RedisCacheConfiguration.defaultCacheConfig()
            .disableCachingNullValues()
            .entryTtl(Duration.ofHours(1))
            .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(RedisSerializer.json()));
    redisCacheConfiguration.usePrefix();

   return RedisCacheManager.RedisCacheManagerBuilder.fromConnectionFactory(lettuceConnectionFactory)
                    .cacheDefaults(redisCacheConfiguration).build();

}
Comment

PREVIOUS NEXT
Code Example
Java :: quadratic program 
Java :: check is element present in queue java 
Java :: Java Super Power java 
Java :: check if item lore is something bukkit 
Java :: Access Members of a Class Java 
Java :: javafx treeview directory 
Java :: Which Is Better to Configure a Spring Boot Project — Properties or YAML? 
Java :: Java extract string between two strings 
Java :: contoh object dalam oop java 
Java :: bukkit java get max players 
Java :: spring jpa group by query method 
Java :: /= java 
Java :: java function 
Java :: gson parse json 
Java :: java character in string 
Java :: camel java 
Java :: palindrome in java 
Java :: add integers java 
Java :: extract substring in string java 
Java :: get my jre path 
Java :: int in string umwandeln 
Java :: android MediaStore update cache before query 
Sql :: mysql disable safe mode 
Sql :: postgres get running query 
Sql :: alter table add column boolean 
Sql :: kill mysql processlist in whose time more than 200 
Sql :: alter table add comment oracle 
Sql :: sql server find table name 
Sql :: query to find table size in oracle 12c 
Sql :: his is incompatible with sql_mode=only_full_group_by 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =