On the implementation of DiskCache in GeckoFX 60.0 & C#

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

On the implementation of DiskCache in GeckoFX 60.0 & C#

Post by windina »

Hello.

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.
thanks.

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);

Post Reply