GAV
GAV

Reputation: 1213

Attempted to call function "apc_fetch" from namespace "Doctrine\Common\Cache"

I've APC installed on my server, wondering if I'm missing something else. I want to be able to cache a 3rd party API request.

     code -
      $cache = new \Doctrine\Common\Cache\ApcCache();

      $data =  $cache->fetch('namesaved');

      if($data === false) { 
      $cache->save('namesaved','keyword');
      } 

      returns -     
     Attempted to call function "apc_fetch" from namespace 
     "Doctrine\Common\Cache" in      vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php line 40.

Upvotes: 0

Views: 4135

Answers (1)

Gerry
Gerry

Reputation: 6012

You are getting this error because the function apc_fetch could not be found. This means that either APC is not (correctly) installed, or that the module is not loaded in the PHP config.

Upvotes: 3

Related Questions