Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APCu classes #11934

Closed
Jurigag opened this issue Jun 28, 2016 · 7 comments
Closed

APCu classes #11934

Jurigag opened this issue Jun 28, 2016 · 7 comments
Assignees
Milestone

Comments

@Jurigag
Copy link
Contributor

Jurigag commented Jun 28, 2016

In php7 in apcu there is no apc_* methods emulation. Phalcon has classes using only apc_*, not apcu. On some point if php 7 support in 2.1.x or later versions like 2.2.x or something will be better/stable we should add classes using APCu, so people don't need to install apcu_bc(which adds polyfill for apc_* methods on php7).

@galki
Copy link

galki commented Aug 4, 2016

+1

Even with apcu_bc I'm getting an error.

$cache->save(...);
// gives error: Call to undefined function apc_store() 

apcu 5.1.4
apcu_bc 1.0.3

@Jurigag
Copy link
Contributor Author

Jurigag commented Aug 4, 2016

You sure it's loaded ? Check phpinfo. And your files .ini files. apcu_bc is added as apc.ini, but it MUST be loaded AFTER apcu.ini I don't have a problem with apcu_bc.

@galki
Copy link

galki commented Aug 4, 2016

That solved it, thank you. I was loading it in the wrong order.

@stevendesu
Copy link

+1 for APCu support

I'll be honest: I haven't fully done my research on this one. I did a bit of Googling for "PHP in-memory caches" and saw that my options were memcached and APCu, and reading up on the two it sounds like memcached is better for distributed environments or setups where more than PHP needs to read the cache, but if it's just PHP one a single server APCu is supposedly more performant. Based only on that minutia of knowledge I Google'd "Phalcon APCu support" and found this thread

I'll try installing APCu + APCu_bc and if it works as described then that will solve all of my issues for now (I have root access and can install whatever I need), but I know some people may not have the ability to install arbitrary extensions. Not to mention more extensions = more bloat, more memory usage, and longer load times.

@sergeyklay
Copy link
Contributor

@Jurigag
Copy link
Contributor Author

Jurigag commented Aug 5, 2016

@stevendesu

Extensions are loaded only on startup, apcu_bc is like a few kb of memory usage, and it has almost none bloat beacause it's just calling apcu functions.

@sergeyklay
Copy link
Contributor

Fixed in the 3.2.x branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants