public class TranslationBatchReadCache extends Object
Translations for a batch of processing. This is mainly
used when executing a search re-index operation. Rather than go to the database for each item being indexed, it makes
more sense to go to the database once, cache all of the results here, and then let the TranslationService
use this instead.| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_NAME |
| Constructor and Description |
|---|
TranslationBatchReadCache() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToCache(List<Translation> translations) |
static String |
buildCacheKey(TranslatedEntity entityType,
String id,
String propertyName,
String localeCode) |
static String |
buildCacheKey(Translation translation) |
static void |
clearCache() |
static net.sf.ehcache.Cache |
getCache() |
static Translation |
getFromCache(TranslatedEntity entityType,
String id,
String propertyName,
String localeCode) |
public static final String CACHE_NAME
public static net.sf.ehcache.Cache getCache()
public static void clearCache()
public static void addToCache(List<Translation> translations)
public static Translation getFromCache(TranslatedEntity entityType, String id, String propertyName, String localeCode)
public static String buildCacheKey(Translation translation)
public static String buildCacheKey(TranslatedEntity entityType, String id, String propertyName, String localeCode)
Copyright © 2016. All rights reserved.