gfcache

package
v1.13.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gfcache provides reading and caching for file contents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBinContents

func GetBinContents(path string, duration ...time.Duration) []byte

GetBinContents returns []byte content of given file by <path> from cache. If there's no content in the cache, it will read it from disk file specified by <path>. The parameter <expire> specifies the caching time for this file content in seconds.

func GetContents

func GetContents(path string, duration ...time.Duration) string

GetContents returns string content of given file by <path> from cache. If there's no content in the cache, it will read it from disk file specified by <path>. The parameter <expire> specifies the caching time for this file content in seconds.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL