Closed Dynamo6Dev closed 3 years ago
No worries, thats updated now
Oops! I just realized I had made a mistake in my first review. When the advanced-cache.php
drop-in is included by WordPress (based on if WP_CACHE
is true
), the Cache Enabler plugin (or any plugin for that matter) isn't loaded yet, meaning cache-enabler.php
hasn't been loaded. That means the default constant wouldn't be defined yet. The change I requested won't work. I sincerely apologize for that oversight. However, the way you initially proposed won't work either because if a class property has an initialization it must be constant, which means the ternary operator in this declaration would cause a fatal error.
This is bringing up some memories of the limitations for why I didn't make those paths customizable yet. Let's close this for now while leaving the linked issue open as I'd like to introduce this control but I need to think of how to best approach it and what may need to change to support it. On the top of my head I'm thinking I will first explore a new way to handle the define statements for our constants so it doesn't rely on Cache Enabler being initialized. I will also explore if what was proposed in #229 would be a good way of handling this. If you or anyone else has ideas on a good approach please feel free to share.
Re issue #226