title: Fatal error: Cannot call constructor in HtmlHelper.php (CakePHP)
body: <p>I am using <strong>cakephp 2.1.1</strong> for my app. I have a controller and I use the file cache in this controller. In the actions of the controller I call a SOAPService using the plugin NUSOAP.</p>
  
  <p>I have two actions:</p>
  
  <p><strong>1. index</strong></p>
  
  <pre><code>public function index() {
      $items = Cache::read('items', 'tenMinutes'); //tenMinutes is the configuration of cache
  
      if($items){
          $service = new Service();
          $items = $service-&gt;callService();
          Cache::write('items',$items,'tenMinutes');
      }
  
      $this-&gt;set('items',$items);
  }
  </code></pre>
  
  <p><strong>2. get_result</strong></p>
  
  <pre><code>public function get_result() {
      $items = Cache::read('items','tenMinutes');
  
      if($items){
  
          //start block code filter items by params  
          ...
          //end
  
          $service = new Service();
          $result = $service-&gt;callService2($items);
          $this-&gt;set('result',$result);
  
      } else {
  
          //redirect index to load ítems
          $this-&gt;redirect(array('controller' =&gt;'controllerName', 'action' =&gt; 'index'));
      }
  }
  </code></pre>
  
  <p>The configuration of cache is:</p>
  
  <pre><code>Cache::config('tenMinutes', array(
          'engine' =&gt; 'File', //[required]
          'duration'=&gt; '10 minutes', //[optional]
          'path' =&gt; CACHE, //[optional] use system tmp directory - remember to use absolute path
          'prefix' =&gt; 'cake_10_', //[optional]  prefix every cache file with this string
      ));
  </code></pre>
  
  <p>When I call index action and is the first time that cakephp writes in cache I have the following error: </p>
  
  <p><strong>Fatal error: Cannot call constructor in C:\wamp\www\myapp\lib\Cake\View\Helper\HtmlHelper.php on line 172</strong></p>
  
  <p>The second time I enter index and cache is already filled I click the button to take me to the second action (get_result), and this returns me the same error.</p>
  
  <p>Can someone help me?</p>
  
  <p>Thanks</p>