Subversion Repositories SmartDukaan

Rev

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

Rev 12620 Rev 12626
Line 172... Line 172...
172
	
172
	
173
	
173
	
174
	public static Map<Long, ExclusiveAffiliateItemInfo> getExclusiveAffiliateItems(){
174
	public static Map<Long, ExclusiveAffiliateItemInfo> getExclusiveAffiliateItems(){
175
		try{
175
		try{
176
			CatalogClient client = new CatalogClient();
176
			CatalogClient client = new CatalogClient();
-
 
177
			Long currentTime = new Date().getTime();
177
			if(exclusiveAffiliateItems == null || fifteenMinsCounter > new Date().getTime()) {
178
			if(exclusiveAffiliateItems == null || fifteenMinsCounter < currentTime) {
178
				exclusiveAffiliateItems = client.getClient().getExAffiliateItemInfo();
179
				exclusiveAffiliateItems = client.getClient().getExAffiliateItemInfo();
179
				fifteenMinsCounter = new Date().getTime() + 15*60000;
180
				fifteenMinsCounter = new Date().getTime() + 15*60000;
180
			}
181
			}
181
		}catch(Exception ce){
182
		}catch(Exception ce){
182
			logger.error("Unable to fetch exclusive items from catalog", ce);
183
			logger.error("Unable to fetch exclusive items from catalog", ce);