Why disk size limit for cache is not regarded for disk_cache::BackendImpl?

27 views
Skip to first unread message

Bartosz Chmura

unread,
Aug 24, 2016, 10:41:27 AM8/24/16
to Chromium-dev
I want to set cache limits, ie max size of cache on hard drive.
In cache_creator.cc there is creation of various backends. I have obvserved that "max_bytes" limit is regarded for backend disk_cache::SimpleBackendImpl but not for disk_cache::BackendImpl.
I.e. for SimpleBackendImpl given cache directory (all files) never exceed "max_bytes" limit, but for BackendImpl directory size if far beyond "max_bytes" limit.
is it normal situation? How to set such limit for BackendImpl?

Chris Bentzel

unread,
Aug 24, 2016, 10:47:02 AM8/24/16
to chm...@gmail.com, Chromium-dev, net...@chromium.org, gav...@chromium.org

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Holger

unread,
Aug 24, 2016, 11:37:19 AM8/24/16
to Chromium-dev
Have you tried disk_cache::BackendImpl::SetMaxSize(int max_bytes) ?
https://cs.chromium.org/chromium/src/net/disk_cache/blockfile/backend_impl.h?q=BackendImpl&sq=package:chromium&l=92

Is it not being respected?

Bartosz Chmura

unread,
Aug 24, 2016, 3:49:03 PM8/24/16
to Chromium-dev
Yes, I have tried it. It's called during creation. It does not work.
Reply all
Reply to author
Forward
0 new messages