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

Get Jake's approval #259

Open
tillkruss opened this issue Aug 24, 2020 · 1 comment
Open

Get Jake's approval #259

tillkruss opened this issue Aug 24, 2020 · 1 comment

Comments

@tillkruss
Copy link
Member

tillkruss commented Aug 24, 2020

EgJS9AoWoAID0_Y

@tillkruss tillkruss changed the title Improvements Get Jake's approval Aug 24, 2020
@naxvog
Copy link
Collaborator

naxvog commented Aug 25, 2020

  • No global variables. Ever.
    We need to refactor our templates as they rely on the current instance $roc. Would coincide with Static class first as we can switch a lot of methods to be static. Obviously we need to rely on global $wp_object_cache;
  • Namespace everything.
    Not sure I agree for constants as well as the plugin entry file. Don't know if he would agree to this exceptions. Cache functions can not be namespaced for obvious reasons. Namespacing the WP_Object_Cache class requires Settings file generation #251 or similar.
  • Static class first
    We can and should switch all methods no requiring state to static ones. Especially WP_Object_Cache might profit from the increased performance not having to load the current instance on certain methods.
  • Avoid the god object
    We should definitely break the Plugin class into logical parts. Might need to break apart WP_Object_Cache too.
  • Defer init to plugins_loaded / One hook init
    I was under the impression that I opened a PR for this a while ago but it apparently didn't make it into master. Would be quite easy to do using the following code (ignores the "don't create instances" part)
add_action( 'plugins_loaded', Rhubarb\RedisCache\Plugin::class, 'instance' );
  • Mozart
    Did try to use Mozart in the past but couldn't figure it out completely. Documentation is lackluster imho. If we can get it configured it would be quite nice to have though.

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

No branches or pull requests

3 participants