in services.php:
use Phalcon\Cache\Frontend\Data as FrontendData;
use Phalcon\Cache\Backend\Memcache as BackendMemcache;
// Set the models cache service
$di->set('modelsCache', function () {
// Cache data for one day by default
$frontCache = new FrontendData(
array(
"lifetime" => 86400
)
);
// Memcached connection settings
$cache = new BackendMemcache(
$frontCache,
array(
"host" => "localhost",
"port" => "11211"
)
);
return $cache;
});
Query in IndexController:
$pathways = GpcrDownstreamPathway::find(
array(
"cache" => array(
"key" => "my-cache"
)
)
);
That causes a 500 error. If I do this:
$pathways = GpcrDownstreamPathway::find();
It works fine. Any ideas?