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

Add Filters to Customize Cache Locking Behavior and Reverse Locking Method Priority #387

Closed
3 tasks done
raamdev opened this issue Dec 27, 2014 · 1 comment
Closed
3 tasks done

Comments

@raamdev
Copy link
Contributor

raamdev commented Dec 27, 2014

Forked from #288 (comment).

It would be desirable to have filters for the following:

  • Disable cache locking
  • Specify desired cache locking method (flock vs sem)

We should also change the default cache locking priority to improve compatibility.

  • Change default cache locking priority to flock()sem_get()

Currently, sem_get() is used if it exists and flock(), which is more compatible, is only used if sem_get() is not available. Since web hosting systems that run on cloud-based filesystems may have issues with sem_get()--even if it's available--we should default to flock() and leave sem_get() as something that an advanced site owner can choose to manually set as the default, via a filter.

@raamdev raamdev added this to the Next Release milestone Dec 27, 2014
raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Dec 27, 2014
raamdev added a commit to wpsharks/zencache-pro-original that referenced this issue Dec 27, 2014
@raamdev raamdev self-assigned this Dec 27, 2014
raamdev added a commit to wpsharks/comet-cache-pro that referenced this issue Dec 27, 2014
raamdev added a commit to wpsharks/zencache-pro-original that referenced this issue Dec 27, 2014
@raamdev raamdev mentioned this issue Dec 27, 2014
4 tasks
@raamdev
Copy link
Contributor Author

raamdev commented Dec 27, 2014

Next release changelog:

  • Enhancement: Added a new filter (quick_cache\\share_disable_cache_locking) to allow disabling cache locking. Simply return boolean TRUE to this filter to disable cache locking. This may be useful for site owners who are experiencing issues with cache locking on web hosting platforms with filesystems that don't properly support locking. Note that this filter must be applied using an Advanced Cache Plugin (see Dashboard → Quick Cache → Plugin Options → Theme/Plugin Developers). See also #387.
  • Enhancement: Added a new filter that allows forcing Semaphore cache locking on hosting platforms where sem_get() is available and would result in improved performance. Return sem to the quick_cache\\share::cache_lock_lock_type filter to force Semaphore cache locking, or flock to use the default method that uses flock(). Note that this filter must be applied using an Advanced Cache Plugin (see Dashboard → Quick Cache → Plugin Options → Theme/Plugin Developers). See also #387.

@raamdev raamdev closed this as completed Dec 27, 2014
@raamdev raamdev removed their assignment Apr 28, 2016
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

1 participant