HOW TO: Reset the link cache before running a Batch Wizard job

Post here if your topic is about CSS HTML Validator but doesn't fit in another forum.
Post Reply
User avatar
Albert Wiersch
Site Admin
Posts: 3783
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

HOW TO: Reset the link cache before running a Batch Wizard job

Post by Albert Wiersch »

CSS HTML Validator keeps a "link cache" in memory for the duration of program execution (the cache is automatically reset when HTML Validator is terminated or reloaded). When a link is checked, the result is stored in the cache so that the link does not have to be checked again. This helps speed up link checking and efficiency. Resetting the link cache will cause all links to be checked again.

If you want to reset the link cache before running a Batch Wizard job, then you can use a small TNPL script.

See this documentation page:
https://www.htmlvalidator.com/2020/docs ... kcache.htm

Put this TNPL function in a text file (name the file whatever you want, maybe something like myuserfunctions.txt):

Code: Select all

function onBeforeMainStart() {
 ProgressMessage('Attempting to reset the link cache...',0x1000);
 
 if resetLinkCache(30) {
  ProgressMessage('The link cache was reset successfully.',0x1000);
 }
 else {
  ProgressMessage('The link cache could not be reset.',2);
 }
}
Then specify that file as a 'user function' file in the Target List Options tab of the Batch Wizard target list that you want it to apply to. Note that you can specify more than one user functions file.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply