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

Comments

Projects
None yet
4 participants
@Jurigag
Member

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

This comment has been minimized.

Show comment
Hide comment
@galki

galki 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

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

This comment has been minimized.

Show comment
Hide comment
@Jurigag

Jurigag Aug 4, 2016

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@galki

galki Aug 4, 2016

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

galki commented Aug 4, 2016

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

@stevendesu

This comment has been minimized.

Show comment
Hide comment
@stevendesu

stevendesu Aug 5, 2016

+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.

stevendesu commented Aug 5, 2016

+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

This comment has been minimized.

Show comment
Hide comment
@Jurigag

This comment has been minimized.

Show comment
Hide comment
@Jurigag

Jurigag Aug 5, 2016

Member

@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.

Member

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 sergeyklay self-assigned this Aug 12, 2016

@sergeyklay sergeyklay modified the milestones: 4.0.0, 3.1.0 Aug 12, 2016

@sergeyklay sergeyklay referenced this issue Feb 27, 2017

Closed

Improved Phalcon\Cache\Backend\Apc #12664

3 of 3 tasks complete

@sergeyklay sergeyklay modified the milestones: 3.2.0, 3.1.0 Feb 28, 2017

@sergeyklay

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay Apr 13, 2017

Member

Fixed in the 3.2.x branch.

Member

sergeyklay commented Apr 13, 2017

Fixed in the 3.2.x branch.

@sergeyklay sergeyklay closed this Apr 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment