gfcache

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 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 ...interface{}) []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 ...interface{}) 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