23. A non-transitory computer-readable medium comprising instructions, execution of which in a computer system causes the computer system to: in response to a search query, copy a first bucket from remote storage to a cache, the first bucket including first data associated with the search query; identify a first file type associated with a first file in the first bucket, wherein the first file is associated with a first usage status; access, based on the search query, a second bucket from the remote storage, the second bucket including second data associated with the search query; identify a second file in the second bucket having the first file type; and copy, in response to the first usage status indicating that the first file was used in processing the search query, the second file from the remote storage to the cache.
28. The non-transitory computer-readable medium of claim 23 , wherein the instructions, upon execution, further cause the computer system to: track a first wait time to access one or more files of the first bucket; track a first search time to process the search query using the first bucket; calculate a prefetch lookahead based on a ratio of the first wait time to the first search time, wherein the prefetch lookahead represents a target number of buckets in a bucket prefetch window, wherein the bucket prefetch window indicates a set of buckets that are candidates for prefetching, wherein prefetching comprises copying one or more files of a bucket of the set of buckets from the remote storage to the cache; in response to the prefetch lookahead exceeding a size of the bucket prefetch window: access, based on the search query, a third bucket from the remote storage; identify a third file in the third bucket having the first file type; and copy the third file from the remote storage to the cache.