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
raamdev opened this issue Dec 27, 2014 · 1 comment
Milestone

Comments

@raamdev
Copy link
Contributor

@raamdev 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 of 4 tasks complete
@raamdev raamdev added the in progress label Dec 27, 2014
@raamdev
Copy link
Contributor Author

@raamdev 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 Dec 27, 2014
@raamdev raamdev removed the in progress label 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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant