use optimal memory while purging cache (#9426)

re-implement the cache purging routine to
avoid using ioutil.ReadDir which can lead
to high allocations when there are cache
directories with lots of content, or
when cache is installed in memory constrainted
environments.

Instead rely on a callback function where we
are not using memory no-more than 8KiB per
cycle.

Precursor for this change refer #9425, original
issue pointed by Caleb Case <caleb@storj.io>
master
Harshavardhana 5 years ago committed by GitHub
parent ac5061df2c
commit 957ecb1b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Loading…
Cancel
Save