Hi,
Random question:
I'm just starting implementing a file cache and using a bytes.Buffer in my testbench as a model of a perfect file.
One slight imperfection, the standard bytes.Buffer does not implement WriteAt which I find a little odd as it does implement ReadAt.
Now this is easy enough to work around, but I wondered if anyone knew the thinking behind it? Is it just no-one has bothered implementing it yet (I find this surprising) or am I missing something subtle here? If no-one has bothered implementing it, should I be publishing my workaround for future inclusion?
Background:
All the caches I've found so far seem based around http. Whereas I'm dealing with a large (pair of) file(s) that I expect to be accessing a small portion of, so a per file cache that caches read and write accesses seems like a really obvious thing to use. However I cannot find anyone else having written something similar. I guess people are just relying on the file system to do this for them.
Thanks
Chris