On the implementation of DiskCache in GeckoFX 60.0 & C#

Discuss building things with or for the Mozilla Platform.
Posts: 1
Joined: January 28th, 2019, 9:44 pm

Post Posted January 28th, 2019, 9:55 pm


I am making a very simple web browser with GeckoFX 60.0 and C #.
I enabled disk cache, but cache file is not created in the specified directory.

1.Is my implementation incorrect?
2.Or is it a problem that exists in GeckoFX 60.0?

If you know anything, please tell me the solution.

Code: Select all
    //The directory has been created in advance
    String cache_path = System.IO.Path.Combine(Directory.GetCurrentDirectory(), "Cache");

    GeckoPreferences.User.SetBoolPref("browser.cache.disk.enable", true);
    GeckoPreferences.User.SetIntPref("browser.cache.disk.capacity", 256000);
    GeckoPreferences.User.SetCharPref("browser.cache.disk.parent_directory", cache_path);
    GeckoPreferences.Default.SetBoolPref("browser.cache.disk.smart_size.enabled", false);
    GeckoPreferences.Default.SetBoolPref("browser.cache.disk.smart_size.first_run", false);

Return to Mozilla Development

Who is online

Users browsing this forum: No registered users and 1 guest