public function cmdGetCache()
    {
        $id = $this->getParam(0);

        if (empty($id)) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        $result = $this->cache->get($id);

        if (!isset($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        $this->outputFormat($result, 'json');
        $this->output();
    }
public function cmdGetCache()
    {
        $id = $this->getParam(0);

        if (empty($id)) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        $result = $this->cache->get($id);

        if (!isset($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }

        $this->outputFormat($result, 'json');
        $this->output();
    }
public function cmdGetCache ( ) { $ id = $ this -> getParam ( 0 ) ; if ( empty ( $ id ) ) { $ this -> errorAndExit ( $ this -> text ( 'Invalid command' ) ) ; } $ result = $ this -> cache -> get ( $ id ) ; if ( ! isset ( $ result ) ) { $ this -> errorAndExit ( $ this -> text ( 'Unexpected result' ) ) ; } $ this -> outputFormat ( $ result , 'json' ) ; $ this -> output ( ) ; }
Callback for "cache-get" command
Callback for cache - get command