Package tech.jhipster.config.cache
Class PrefixedKeyGenerator
- java.lang.Object
-
- tech.jhipster.config.cache.PrefixedKeyGenerator
-
- All Implemented Interfaces:
org.springframework.cache.interceptor.KeyGenerator
public class PrefixedKeyGenerator extends Object implements org.springframework.cache.interceptor.KeyGenerator
PrefixedKeyGenerator class.
This class is responsible for generating cache keys that are specific to a version of the application by prefixing them with git commit hash.
This allows multiple versions of an application to "share" the same distributed cache even when the structure of the values has changed between those versions of the software.
This case typically occurs in production to ensure zero-downtime updates across a cluster requiring that two different versions of the application have to run concurrently for some time.
-
-
Constructor Summary
Constructors Constructor Description PrefixedKeyGenerator(org.springframework.boot.info.GitProperties gitProperties, org.springframework.boot.info.BuildProperties buildProperties)Constructor for PrefixedKeyGenerator.
-
-
-
Constructor Detail
-
PrefixedKeyGenerator
public PrefixedKeyGenerator(org.springframework.boot.info.GitProperties gitProperties, org.springframework.boot.info.BuildProperties buildProperties)Constructor for PrefixedKeyGenerator.
- Parameters:
gitProperties- aGitPropertiesobject.buildProperties- aBuildPropertiesobject.
-
-