Ideas

Add Job to Clean Up "NuGetScratch" directory

Note You are not authorized to edit this feature.

Add Job to Clean Up "NuGetScratch" directory

Core

When performing a Rock update, large numbers of files are written to c:/Windows/temp/NugetScratch/[someguid] directories. A single Rock update can write 500MB or more for a single update, and these are *never* cleaned up unless done so manually. On a Rock system that has had many updates over the years the NugetScratch directory get severely bloated and can be over 20*Gigabytes*.

A knee jerk reaction might be to just say "since the NugetScratch is written to c:/Windows/temp, it's up to Windows to clean it up..." but this simply doesn't happen. Even if you have a process to clean up the temp directory on Windows restarts, the long-running nature of a web server means these don't happen very often. I believe since Rock updates are the *cause* of these files being created and abandoned, it should also clean them up.

I'm suggesting that a Rock Job be added that can clean up these Rock-update-induced temp files on a regular basis. This assumes Rock "knows" which directories under /NuGetScratch *it* caused to be created, though, since you can't assume that all directories there are Rock-related. I don't know if that's possible or not.


Photo of Jim MichaelSubmitted by Jim Michael, The Crossing - Chesterfield  ·   ·  Core
Login to add a comment...

Submission Success Tips

Cultivate your ideas for maximum impact with these helpful submission tips that will increase the chances of your brilliant concepts becoming reality.

  • Clear Title: Craft a straightforward and descriptive title that instantly conveys the essence of your idea.
  • Concise Description: Provide an idea description that is succinct, ensuring it effectively communicates the concept without unnecessary verbosity.
  • Provide Additional Details: With a concise description complete, now provide any other details that are needed to better understand the requirements.
  • Thorough Ministry Need Review: Provide a comprehensive overview of the ministry need your idea addresses, emphasizing its significance.
  • Cover the WHY: Clearly articulate the rationale behind your idea, explaining why it's essential and how it aligns with the organization's goals and mission. Oftentimes a clear "why" sheds light into other possible options.