Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

using caching with Phalcon\Mvc\Model

I am following ORM caching to implement cache with micro app but

    $app->get('/getCompanies', function() use ($app, $di) {

        $companies = Company::find();

        $companies = Company::find(array(
            'columns' => 'company_id, company_name',
            'cache'   => array(
                'key' => 'my-cache'
            )
        ));

        $companies->toArray();

always stuck with error

PHP Fatal error: Class 'memcache' not found

and for now I think this module has not yet available within then anonymouse function but don't know how to fix that. Can anyone pls advise? Thanks



442
Accepted
answer

I figure it out myself, just miss the php module memcache since I have installed memcached on my machine. Thanks for your attention. :)