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 UI option for cache cleanup schedule; See: websharks/zencache#472 #180

Merged
merged 6 commits into from
Nov 19, 2015

Conversation

kristineds
Copy link
Contributor

Add UI option for cache cleanup schedule;

  • This is Step 2 of 2 of ZC GHI: purge_cache CRON Should Run Every Hour
  • Added under Cache Expiration Time per Raam's instructions. ZenCache → Plugin Options → Cache Expiration Time
  • Removed any mention of the Auto-Cache Engine

ZenCache Cache Cleanup Schedule

See: wpsharks/comet-cache#472

@kristineds
Copy link
Contributor Author

@jaswsinc @raamdev Please see latest commit with updated changes feeebd9

@raamdev
Copy link
Contributor

raamdev commented Nov 18, 2015

@kristineds Nice work! Here's a small requested change:

The description currently reads: "If you have an extremely large site with a lower expiration time, %1$s can be told to set a Cache Cleanup Schedule to prevent the cache files from slowing down your server via WP Cron at a hourly (set by default) interval."

I suggest we tweak that as follows:

"If you have an extremely large site and you set a lower cache expiration time, expired cache files can build up more quickly. By default, %1$s cleans up expired cache files via WP Cron at an hourly interval, but you can tell %1$s to use a custom Cache Cleanup Schedule below to run the clean up process more or less frequently depending on your specific needs."

Note that I removed the italic text; I don't think that's necessary.

@raamdev
Copy link
Contributor

raamdev commented Nov 18, 2015

@kristineds Could you also please move this new section above the section titled Disable Cache Expiration If Server Load Average is High? The new Cache Cleanup Schedule seems like it should come right after the Automatic Expiration Time section, as the Load Average section is far less likely to be used by a site owner.

@kristineds
Copy link
Contributor Author

@raamdev That has been updated. 9d91959

Placing it above the section titled Disable Cache Expiration If Server Load Average is High?

ZenCache Cache Cleanup Schedule

@raamdev
Copy link
Contributor

raamdev commented Nov 18, 2015

@kristineds Can you please remove the italic <em> around "WP Cron"? Also, if that link as text-decoration: none, please remove that as well.

Also, please change "and you set a lower cache expiration time" to "and you lower the default Cache Expiration Time of 7 days".

@kristineds
Copy link
Contributor Author

@raamdev Latest commit submitted. cc @jaswsinc d702eeb

  • removed the italic around "WP Cron"
  • removed as text-decoration: none,
  • changed "and you set a lower cache expiration time" to "and you lower the default Cache Expiration Time of 7 days".
  • the following text in Cache Expiration Time updated to reflect the new hourly schedule (it currently says "once daily", it should now say "once per hour"):

ZenCache Cache Cleanup

@jaswrks
Copy link
Contributor

jaswrks commented Nov 19, 2015

Some minor tweaks from me in 0d2357b

  • Changed clean up to cleanup.
  • Made "WP Cron" link a Redirect from zencache.com.
  • Made wp_schedule_event() link a Redirect from zencache.com.
  • Changed "compatible with WordPress wp_schedule_event()" to improve wording just a bit.

2015-11-19_06-53-05

@jaswrks
Copy link
Contributor

jaswrks commented Nov 19, 2015

@raamdev Would it be a good idea to make this a select menu of predefined options? That would eliminate the need for the additional Tip below this field, and we could pull the list of available options using: https://codex.wordpress.org/Function_Reference/wp_get_schedules

My feeling is that having a select menu would make this more user-friendly. That way, what you select is going to work, no question. The default CRON schedules are: hourly, twicedaily and daily. With ZenCache installed, you pick up one more: every15m; i.e., it is added by ZenCache, and it will show up in a call to wp_get_schedules().

@raamdev
Copy link
Contributor

raamdev commented Nov 19, 2015

@jaswsinc writes...

Would it be a good idea to make this a select menu of predefined options? That would eliminate the need for the additional Tip below this field, and we could pull the list of available options using: https://codex.wordpress.org/Function_Reference/wp_get_schedules

Yes! Great idea. That would be much better here, especially given the fact that some site owners may have used another plugin to create their own WP Cron schedules and if we build a dynamic list using wp_get_schedules(), our list will also show their custom schedules.

@raamdev
Copy link
Contributor

raamdev commented Nov 19, 2015

@kristineds writes...

Latest commit submitted. cc @jaswsinc d702eeb

Looks great. Thank you! 😄

@jaswsinc writes...

Some minor tweaks from me in 0d2357b

Awesome. Thanks for those.

@jaswrks
Copy link
Contributor

jaswrks commented Nov 19, 2015

2015-11-19_13-44-19

@jaswrks
Copy link
Contributor

jaswrks commented Nov 19, 2015

@raamdev Please review when you get a moment. Thanks :-)

@raamdev
Copy link
Contributor

raamdev commented Nov 19, 2015

@jaswsinc Sweet! I just tested the menu and it looks great! One question: The default when I installed this branch version was "Twice Daily"; is that correct? I thought it was being changed to "hourly".

2015-11-19_18-15-38

@jaswrks
Copy link
Contributor

jaswrks commented Nov 19, 2015

The default when I installed this branch version was "Twice Daily"; is that correct? I thought it was being changed to "hourly".

Cool. Yeah, I had some unexpected results like that also. If you can merge this into the dev branch, along with step 1 also, we can test both of those together. I think testing this branch by itself as-is, is problematic, because it doesn't include the new option key internally, which goes with this UI enhancement.

@raamdev
Copy link
Contributor

raamdev commented Nov 19, 2015

I think testing this branch by itself as-is, is problematic, because it doesn't include the new option key internally, which goes with this UI enhancement.

Ah, that makes sense. I had assumed this branch did include those changes. :-) Thanks. I'll merge these in shortly.

@raamdev raamdev merged commit 8857401 into 000000-dev Nov 19, 2015
@raamdev
Copy link
Contributor

raamdev commented Nov 19, 2015

Merged. Thank you @kristineds and @jaswsinc! :-)

@kristineds
Copy link
Contributor Author

Cool @jaswsinc! Love those dropdown menu! Definitely more user-friendly than typing it in 👍

@raamdev raamdev deleted the feature/472-step2 branch November 21, 2015 23:09
@jaswrks
Copy link
Contributor

jaswrks commented Nov 24, 2015

Love those dropdown menu! Definitely more user-friendly than typing it in

Cool. Glad to hear it! :-)

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