Subversion Repositories SmartDukaan

Rev

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

Rev 13901 Rev 14139
Line 215... Line 215...
215
 * @return void
215
 * @return void
216
 */
216
 */
217
	public function view($id = null,$bundleId=null) {
217
	public function view($id = null,$bundleId=null) {
218
		$this->layout = "innerpages";
218
		$this->layout = "innerpages";
219
		$cachekey = 'storeproduct-'.$id;
219
		$cachekey = 'storeproduct-'.$id;
220
		$product = Cache::read($cachekey,'month');
220
		$product = Cache::read($cachekey,'fivemin');
221
		if(empty($product)) {
221
		if(empty($product)) {
222
			$url = $this->apihost.'masterData/getSkuById/'.$id;
222
			$url = $this->apihost.'masterData/getSkuById/'.$id;
223
			$product = $this->make_request($url,null);
223
			$product = $this->make_request($url,null);
224
			Cache::write($cachekey,$product,'month');			
224
			Cache::write($cachekey,$product,'fivemin');			
225
		}
225
		}
226
		$storeProduct = json_decode($product[0],1);
226
		$storeProduct = json_decode($product[0],1);
227
		$activestores = Configure::read('activestores');
227
		$activestores = Configure::read('activestores');
228
		$this->set(compact('storeProduct','activestores'));
228
		$this->set(compact('storeProduct','activestores'));
229
	}
229
	}