Subversion Repositories SmartDukaan

Rev

Rev 2975 | Rev 3050 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2975 Rev 2989
Line 1... Line 1...
1
package in.shop2020.serving.controllers;
1
package in.shop2020.serving.controllers;
2
 
2
 
3
import in.shop2020.model.v1.catalog.InventoryServiceException;
3
import in.shop2020.datalogger.EventType;
4
import in.shop2020.model.v1.catalog.InventoryService.Client;
4
import in.shop2020.model.v1.catalog.InventoryService.Client;
-
 
5
import in.shop2020.model.v1.catalog.InventoryServiceException;
5
import in.shop2020.serving.utils.FileUtils;
6
import in.shop2020.serving.utils.FileUtils;
6
import in.shop2020.serving.utils.Utils;
7
import in.shop2020.serving.utils.Utils;
7
import in.shop2020.thrift.clients.CatalogServiceClient;
8
import in.shop2020.thrift.clients.CatalogServiceClient;
-
 
9
import in.shop2020.utils.DataLogger;
8
 
10
 
9
import java.io.File;
11
import java.io.File;
10
import java.io.IOException;
12
import java.io.IOException;
11
import java.util.ArrayList;
13
import java.util.ArrayList;
12
import java.util.List;
14
import java.util.List;
Line 47... Line 49...
47
    	logger.info("Rendering the home page");
49
    	logger.info("Rendering the home page");
48
    	
50
    	
49
    	if(bestDealSnippets == null || bestSellerSnippets == null || latestArrivalSnippets == null){
51
    	if(bestDealSnippets == null || bestSellerSnippets == null || latestArrivalSnippets == null){
50
    	    logger.info("Cache miss: Reloading best deals, best sellers and latest arrivals");
52
    	    logger.info("Cache miss: Reloading best deals, best sellers and latest arrivals");
51
            setSnippets();    	    
53
            setSnippets();    	    
52
    	}	
54
    	}
53
    	
55
    	
-
 
56
    	DataLogger.logData(EventType.HOME_PAGE, session.getId(), userinfo.getUserId(), userinfo.getEmail());
54
    	return "index";
57
    	return "index";
55
    }
58
    }
56
 
59
 
57
    /**
60
    /**
58
     * Renders the home page but always loads the snippets for best deals, best
61
     * Renders the home page but always loads the snippets for best deals, best