Persistant disc cache

Vincent Sanders vince at netsurf-browser.org
Mon Jun 9 13:20:33 BST 2014


On Sun, Jun 08, 2014 at 05:45:17PM +0100, Steve Fryatt wrote:
> On 5 Jun, Vincent Sanders wrote in message
>     <20140605150105.GL27671 at kyllikki.org>:
> 
> > The amount of disc used for this cache is selected using the
> > disc_cache_size option in the choices file. The RISC OS frontend does not
> > currently have a user interface to set this value.
> 
> It does now (or it will soon; I've just spotted disc_cache_age, which
> probably needs a field as well).
> 
> :-)

Indeed, although disc_cache_age is not implemented right now, there is
provision within the new system to allow for it. It will mean objects
that have not been used older than this value will be discarded
preventing the disc cache from filling with old files no longer
used. This is in addition to them being discarded when the cache size
limit is exceeded.


> 
> > The cache value is number of bytes to use on disc and a value of 0 will
> > disable the cache completely. The default value is set to a gigabyte.
> 
> Apologies if I'm missing something, but does disc_cache_size really want to
> be a signed int? It goes negative before you get to a 2GB cache (on RISC OS,
> at least), which seems a little close to the 1GB default.

You were quite right, changed the option to an unsigned int so its now 4gigabytes

> 
> I don't know if this upsets the underlying cache, but I've limited the
> RISC OS GUI to 2047MB for now.

Underlying cache does calculations in size_t (unsigned 32bit on RISC
OS) so should be fine.


> 
> -- 
> Steve Fryatt - Leeds, England
> 
> http://www.stevefryatt.org.uk/
> 
> 

-- 
Regards Vincent
http://www.kyllikki.org/



More information about the netsurf-dev mailing list