Subversion Repositories SmartDukaan

Rev

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

Rev 16013 Rev 16082
Line 852... Line 852...
852
		$this->layout = 'ajax';
852
		$this->layout = 'ajax';
853
	    echo(json_encode($json));die;
853
	    echo(json_encode($json));die;
854
	}
854
	}
855
 
855
 
856
	public function getlinks($userId) {		
856
	public function getlinks($userId) {		
-
 
857
		$cachekey = 'userlinks-'.$userId;
857
		$links = array();
858
		$links = Cache::read($cachekey,'day');
-
 
859
		if(empty($links)) {
858
		$links[3] = $this->getCatergoryLinks($userId,3);
860
			$links[3] = $this->getCatergoryLinks($userId,3);
859
		$links[5] = $this->getCatergoryLinks($userId,5);
861
			$links[5] = $this->getCatergoryLinks($userId,5);
-
 
862
			Cache::write($cachekey,$links,'day');
-
 
863
		}
860
	 	if ($this->request->is('requested')) {
864
	 	if ($this->request->is('requested')) {
861
            return $links;
865
            return $links;
862
        }
866
        }
863
        $this->set('links', $links);
867
        $this->set('links', $links);
864
	}
868
	}