コード例 #1
0
 public void addLanguage(Language l) {
   DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
   long id = l.getId();
   String idSt = String.valueOf(l.getId());
   String languageKey = l.getLanguageCode() + "-" + l.getCountryCode();
   cache.put(getPrimaryGroup() + id, l, getPrimaryGroup());
   cache.put(getPrimaryGroup() + idSt, l, getPrimaryGroup());
   cache.put(getPrimaryGroup() + languageKey, l, getPrimaryGroup());
 }
コード例 #2
0
  @Override
  protected Link add(String key, Link menuLink) {
    key = primaryGroup + key;

    // Add the key to the cache
    cache.put(key, menuLink, primaryGroup);

    return menuLink;
  }
コード例 #3
0
 @Override
 public void setLanguageKeys(String langCode, String countryCode, List<LanguageKey> keys) {
   DotCacheAdministrator cache = CacheLocator.getCacheAdministrator();
   String languageKey =
       getPrimaryGroup()
           + "_Keys_"
           + (countryCode != null ? langCode + "_" + countryCode : langCode);
   cache.put(languageKey, keys, getPrimaryGroup());
 }