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

Backwards compatibility for ZENCACHE_ALLOWED is missing #683

Closed
raamdev opened this issue Feb 24, 2016 · 7 comments
Closed

Backwards compatibility for ZENCACHE_ALLOWED is missing #683

raamdev opened this issue Feb 24, 2016 · 7 comments

Comments

@raamdev
Copy link
Contributor

raamdev commented Feb 24, 2016

There should be backwards compatibility in Comet Cache for the ZENCACHE_ALLOWED constant, so that if a site owner had been using define('ZENCACHE_ALLOWED', FALSE);, Comet Cache should pick that up and treat it the same way it would COMET_CACHE_ALLOWED (i.e., caching should be disabled if that constant is set to FALSE).

However, I confirmed that ZENCACHE_ALLOWED is not working in Comet Cache v160223.1.


Reported in (private ticket): https://websharks.zendesk.com/agent/tickets/11379

@jaswrks
Copy link

jaswrks commented Feb 24, 2016

It looks like the 12 here needs to change to the number of characters in ZENCACHE_. https://github.com/websharks/comet-cache-pro/blob/160223.1/src/includes/classes/AdvCacheBackCompat.php#L54

@raamdev
Copy link
Contributor Author

raamdev commented Feb 24, 2016

@jaswsinc Ah! Thanks for pointing that out. That would've taken me some digging to discover. 😄

@raamdev
Copy link
Contributor Author

raamdev commented Feb 24, 2016

@jaswsinc Correct me if I'm wrong, but it looks like GLOBAL_NS is not available in the scope of where this runs: https://github.com/websharks/comet-cache-pro/blob/160223.1/src/includes/classes/AdvCacheBackCompat.php#L54

@raamdev
Copy link
Contributor Author

raamdev commented Feb 24, 2016

Hmm, nope, that's wrong. I see that src/includes/stub.php, where GLOBAL_NS is defined, gets included before the compat. routines: https://github.com/websharks/comet-cache-pro/blob/160223.1/src/includes/templates/advanced-cache.txt#L22-L28

I'm trying to figure out why despite this line being run (now that I've fixed the number of characters being looked for), the COMET_CACHE_ALLOWED constant is not being set.

@raamdev
Copy link
Contributor Author

raamdev commented Feb 24, 2016

Ah, it's because GLOBAL_NS is set to a lowercase comet_cache, which results in the constant being set to comet_cache_ALLOWED, instead of COMET_CACHE_ALLOWED.

raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Feb 24, 2016
raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Feb 24, 2016
raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Feb 24, 2016
@raamdev
Copy link
Contributor Author

raamdev commented Feb 27, 2016

Next Release Changelog:

  • Bug Fix: Fixed a ZenCache Backwards Compatibility bug that was preventing ZENCACHE_ALLOWED from working properly with Comet Cache. See Issue #683.

@raamdev raamdev closed this as completed Feb 27, 2016
@raamdev
Copy link
Contributor Author

raamdev commented Feb 27, 2016

Comet Cache v160227 has been released and includes changes from this GitHub Issue. See the v160227 announcement for further details.


This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#683).

@wpsharks wpsharks locked and limited conversation to collaborators Feb 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants