• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    How to set a certain amount of cache so that it does not exceed the specified size?

    Opera for Windows
    2
    2
    2214
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Former User
      A Former User last edited by

      It is necessary that the volume of the cache does not exceed a total of 10 megabytes.
      The key --disk-cache-size can not cope with this task.

      Reply Quote 0
        l33t4opera 1 Reply Last reply
      • l33t4opera
        l33t4opera @Guest last edited by leocg

        Hi @temkem, first of all one should know as follows:
        1. The "--disk-cache-size and --media-cache-size are only hints to the cache, not hard limits. In particular, 0 cannot be used to disable the cache, and values under a few megabytes are basically under the minimum size of the cache, and won't prevent writing to disk although will likely cause things to be evicted right away" - the source link.
        2. "The size should be roughly limited by the argument... so setting the limit to 10 MB should not result in the cache reporting 19 MB.
        However, we intentionally don't evict entries for the first few minutes of browsing, so if you are just adding the command line, browsing and immediately going over the limit, and looking at net-internals, the limit will not be enforced quite yet.
        Wait a few minutes before the test" - the source link.

        As in conclusion from that, what the developer wrote, you can try to experiment with lower limits for both flags, and check if you can find the proper values, that will not allow to exceed the expected disk space use.

        You can also try use the following flags, to disable other cache types:
        1. --disable-gpu-program-cache,
        2. --disable-gpu-shader-disk-cache.

        Additionally, you can check, if using the --aggressive-cache-discard flag makes any different in your case.

        Reply Quote 0
          1 Reply Last reply
        • First post
          Last post

        Computer browsers

        • Opera for Windows
        • Opera for Mac
        • Opera for Linux
        • Opera beta version
        • Opera USB

        Mobile browsers

        • Opera for Android
        • Opera Mini
        • Opera Touch
        • Opera for basic phones

        • Add-ons
        • Opera account
        • Wallpapers
        • Opera Ads

        • Help & support
        • Opera blogs
        • Opera forums
        • Dev.Opera

        • Security
        • Privacy
        • Cookies Policy
        • EULA
        • Terms of Service

        • About Opera
        • Press info
        • Jobs
        • Investors
        • Become a partner
        • Contact us

        Follow Opera

        • Opera - Facebook
        • Opera - Twitter
        • Opera - YouTube
        • Opera - LinkedIn
        • Opera - Instagram

        © Opera Software 1995-2025