예제 #1
0
  public void reCacheCode(String cacheName) {

    System.out.println("################################################");
    if (cacheName == null || "all".equals(cacheName)) {
      this.codeCache.put(new Element("codeList", codeService.cacheCodeData()));
      this.codeCache.put(new Element("productList", codeService.cacheAllProductData()));
      System.out.println("             Completed common code cache!              ");
    } else if ("codeList".equals(cacheName)) {
      this.codeCache.put(new Element("codeList", codeService.cacheCodeData()));
      System.out.println("             Completed common code & product code cache!");
    } else if ("productList".equals(cacheName)) {
      this.codeCache.put(new Element("productList", codeService.cacheAllProductData()));
      System.out.println("             Completed product code cache!              ");
    }
    System.out.println("################################################");
  }
예제 #2
0
  @PostConstruct
  public void cacheCodeList() {

    System.out.println("################################################");

    this.codeCache.put(new Element("codeList", codeService.cacheCodeData()));
    this.codeCache.put(new Element("productList", codeService.cacheAllProductData()));

    System.out.println("             Completed common code cache!              ");
    System.out.println("             Completed product code cache!              ");

    System.out.println("################################################");
  }