Created
December 20, 2022 06:19
-
-
Save AseemWangoo/a9a829167157d543429058bb356cc788 to your computer and use it in GitHub Desktop.
url cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main() { | |
const dylibPath = '/System/Library/Frameworks/Foundation.framework/Versions/Current/Foundation'; | |
final lib = URLCacheLibrary(DynamicLibrary.open(dylibPath)); | |
final urlCache = NSURLCache.getSharedURLCache(lib); | |
if (urlCache != null) { | |
print('currentDiskUsage: ${urlCache.currentDiskUsage}'); | |
print('currentMemoryUsage: ${urlCache.currentMemoryUsage}'); | |
print('diskCapacity: ${urlCache.diskCapacity}'); | |
print('memoryCapacity: ${urlCache.memoryCapacity}'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment