Manage local cache size of downloaded builds
Introduction
The Local Cache Management automation feature in AccelByte Development Toolkit (ADT) Hub enables you to control the cache size of downloaded builds in your local machine, optimizing your system's storage usage and performance.
This article describes how the Local Cache Management automation works and how you can set it up to your preferred limit and schedule.
How the Local Cache Management automation works
First, you must configure your preferred limit for the cache size of your downloaded builds and set the schedule for when to run the automation. Note that this automation runs daily, so specify the time of day for it to be triggered.
At the scheduled time, ADT Hub triggers the automation to perform the following actions:
Cache size check: ADT Hub checks if any of your game's local cache size exceeds the specified limit.
Cache purge: if any of your games' cache size exceeds the specified limit, ADT Hub initiates the cache purge process with these steps:
- Selective purging: only games with cache sizes that surpass the limit are purged; games within the limit remain unaffected.
- Cache reduction: ADT Hub will reduce each game's cache size to the specified limit. For example, if you have a 20 GB cache size limit in your namespace and two active games using Smart Builds where Game A's cache is 25 GB and Game B's is 28 GB, ADT Hub will delete 5 GB from Game A's cache and 8 GB from Game B's, bringing both down to the 20 GB limit.
- Purge order: The cache from the oldest downloaded game builds are deleted first.
In ADT Hub version 1.3.0 and later, a "last-accessed" timestamp is added to the metadata of downloaded builds during the staging process. ADT Hub uses this timestamp to determine which builds to delete, prioritizing those with the oldest "last-accessed" (or last staged) timestamp.
This automation is triggered only when ADT Hub is open at the scheduled time. If ADT Hub is closed at the scheduled time, the automation will run the next time you open ADT Hub.
Set up Local Cache Management automation
To set up the limit and schedule of the Local Cache Management automation, follow these steps:
In ADT Hub, click on your namespace and select Application Settings from the dropdown.
On the Application Settings window, in the Local cache directory section, enable the Cache Limit input box under the No maximum size option.
注記Choose the No maximum size option to disable the automation.
Type in your desired cache size limit in GB.
importantThe minimum cache size limit is 1 GB. However, we recommend setting your cache size limit to be at least twice the size of your typical build to ensure optimal performance and storage efficiency.
In the Schedule section, specify the time (hour and minutes) at which ADT Hub will run the daily automation.
Click on Confirm to save your changes.
Automation notifications
When the Local Cache Management automation starts, ADT Hub will notify you in two ways:
Via the Activity tab in ADT Hub
Via Windows system notifications
FAQ
Q: Is there a minimum limit for the cache size?
A: The minimum limit is 1 GB, but we recommend setting your cache size limit to two times larger than your typical build size.
Q: What if my ADT Hub is not opened when the scheduler is due?
A: The Local Cache Management automation will be triggered the next time you open your ADT Hub.
Q: I have Smart Builds still downloading right before the schedule that I already set. How will it affect the automation?
A: ADT Hub will prioritize finishing any ongoing Smart Build downloads before running the scheduled Local Cache Management automation. You will be notified that the automation is delayed and that it will be triggered once the ongoing downloads are completed.
Q: The automation has been triggered, but my cache size hasn't adjusted to the limit. Why not?
A: If you have more than one active game that uses Smart Builds in your namespace, note that the cache size limit is applied to each game's cache separately, not the combined total of all your active games. If each game's cache is under the limit, the cache purge process will not be triggered, even if the overall cache size across all games exceeds the limit.