Go Back   vb.org Archive > vBulletin Modifications > vBulletin 5.x Modifications > vBulletin 5.x Products & Extensions

Reply
 
Thread Tools
Clear Cache Scheduled Task by BOP5 Details »»
Clear Cache Scheduled Task by BOP5
Version: 1.00, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 5.4.x Rating:
Released: 01-29-2019 Last Update: Never Installs: 15
Re-useable Code  
No support by the author.

The purpose of this file is to clear the cache on a regular basis. Most sites will not need this. Do not attempt to install it unless you have very good reason to.

To use/install

1) Download file, extract bop5_clearcache.php file and upload it to the /core/admincp/ folder.

2) Go to the Admin CP -> Scheduled Tasks -> Add New Scheduled Task

3) Fill out the form as the following:

Varname: vbcacheclean
Day of the week: *
Day of the month: *
Hour: 20
Minute: 10 - - - - -
Active: Yes
Log Entries: No
Filename:
Code:
./admincp/bop5_clearcache.php
Product: vBulletin
vBulletin Default: Yes

(Leave unmentioned fields blank or as is)

---

Of course you can change the hour and minute to your needs, this example will run once a day around 20:10 (or 8:10PM.) You should set this to run at a relatively busy time for the forum, so it doesn't get missed, but not necessarily the busiest time.

This will erase it once a day. You can adjust the settings above to run it more often, such as once an hour by setting Hour to * instead of a set number.

I hope this helps, I know some people have asked for this, even though it should not be needed it sometimes is.

Download Now

File Type: zip bop5_clearcache.zip (344 Bytes, 99 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
KevinL

Comments
  #12  
Old 02-07-2021, 05:23 PM
migratoria migratoria is offline
 
Join Date: Oct 2011
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's right it doesn't work. Can anyone help and review this script for vb 5.6.4?
Reply With Quote
  #13  
Old 02-07-2021, 06:11 PM
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just put it to core/includes/cron (have no package here but should be the standard path for vb crons...) and look at any other cron for the path to use. It is not working because the path is wrong now.
Reply With Quote
  #14  
Old 02-07-2021, 06:20 PM
migratoria migratoria is offline
 
Join Date: Oct 2011
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Posted in core/includes/cron/bop5_clearcache.php

In the options
Name file: .core/includes/cron/bop5_clearcache.php

If I click run now: It says Done but it doesn't actually work
Reply With Quote
  #15  
Old 02-08-2021, 03:07 AM
delicjous's Avatar
delicjous delicjous is offline
 
Join Date: Nov 2014
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, the code of this plugin is not the best but I did not check it before.

I created my own addon in 2018... that code work!
Replace everything in your file with:
PHP Code:
<?php if (!defined('VB_ENTRY')) die('Access denied.');

error_reporting(E_ALL & ~E_NOTICE);
    
vB_Cache::resetCache();
vB::getDatastore()->resetCache();

log_cron_action('Cache cleaned!'$nextitem1);
?>
That should work!
Reply With Quote
2 благодарности(ей) от:
DamasGate, Mr Peabody
  #16  
Old 02-08-2021, 06:14 AM
migratoria migratoria is offline
 
Join Date: Oct 2011
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by delicjous View Post
Ok, the code of this plugin is not the best but I did not check it before.

I created my own addon in 2018... that code work!
Replace everything in your file with:
PHP Code:
<?php if (!defined('VB_ENTRY')) die('Access denied.');

error_reporting(E_ALL & ~E_NOTICE);
    
vB_Cache::resetCache();
vB::getDatastore()->resetCache();

log_cron_action('Cache cleaned!'$nextitem1);
?>
That should work!
Thank you
Reply With Quote
  #17  
Old 02-14-2021, 08:26 PM
Mr Peabody Mr Peabody is offline
 
Join Date: May 2004
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still not working for me. At wits end with this issue.
Reply With Quote
  #18  
Old 09-30-2023, 03:41 PM
dmark101's Avatar
dmark101 dmark101 is offline
 
Join Date: Oct 2002
Location: SoCal
Posts: 71
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just tried this on vB 5.6.9 and it worked like a charm. I'll monitor it for the next couple of days to see if there are any hiccups.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04498 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)post_thanks_box
  • (3)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (1)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete