We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Warning: apc_store(): GC cache entry

Hello!

I am using Phalcon ModelMetadata Apc for sroting info about Models


  $di->setShared('modelsMetadata', function () {
    $metadata = new \Phalcon\Mvc\Model\MetaData\Apc([
        'lifetime' => 86400,
        'prefix'   => 'my-prefix'
    ]);

    return $metadata;
});

So, and detected a seldom warning: Warning: apc_store(): GC cache entry '$PMM$my-prefixmeta-signlog-signlog' was on gc-list for 6487 seconds in /____/app/controllers/PayController.php on line 17

On this 17 line there is a creation of Transaction \Phalcon\Mvc\Model


$transaction->create()

So, it is the first time I detected this warning. What happened?

I have also a SignLog model, but in this action it haven't been called.

edited Oct '16

First of all you are using apc or apcu extension ? You should use the second one. https://stackoverflow.com/a/4680299/4035199 there is why you have this warning

edited Oct '16

Recommendation: use (lib)Memcached instead of APC* modules for caching of models metadata and other types of data.