Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiskCacheHandler ¶
type DiskCacheHandler struct {
// cache page size. 0 will use the default page size.
// This value should only be changed before the cache handler
// is PageSize set
PageSize int
// contains filtered or unexported fields
}
DiskCacheHandler caches reads to an *os.File
func NewDiskCache ¶
func NewDiskCache(f *os.File, fileSize int64) *DiskCacheHandler
NewDiskCache returns a CacheHandler strategy that caches reads to f. fileSize should be the size in bytes of the upstream object that is being cached. The state of the cache is stored in memory so it is not safe to share a cache file between different readers.
Click to show internal directories.
Click to hide internal directories.