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

Cache_memcached: Improve #3620

Closed
wants to merge 1 commit into from
Closed

Cache_memcached: Improve #3620

wants to merge 1 commit into from

Conversation

FrankFFFF
Copy link
Contributor

Reduce unnecessary checks.

_setup_memcached($is_memcached):

  1. Once extension loaded, the class will be automatically enable, so it is
    unnecessary to check class_exists again.
  2. Added 'is_memcached' into $_memcache_conf for further usage.

save():
Use 'is_memcached' instead of get_class

Reduce unnecessary checks.

_setup_memcached($is_memcached):
Once extension loaded, the class will be automatically enable, so it is
unnecessary to check class_exists again.
Added 'is_memcached' into $_memcache_conf for further usage.

save():
Use 'is_memcached' instead of get_class
@narfbg
Copy link
Contributor

narfbg commented Feb 24, 2015

The name $is_memcached is ambiguous, especially for a config option - I have a bad feeling about such a setting.

I'm not convinced this is the right approach, if a change is necessary at all ... setting a property from inside is_supported() would be more simplistic and efficient.

@FrankFFFF
Copy link
Contributor Author

This changes has performance difference, but i totally agree with your points.
Will work on it later.

@FrankFFFF FrankFFFF closed this Feb 25, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants